-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate font family and font style in font name #4102
Comments
From @mikemorris on June 3, 2015 20:32 Just wanted to add that I'm not sure if we'll be able to easily break down the style as precisely as CSS does, we may be limited to the string that FreeType gives us for While the detailed CSS spec looks like:
...we may instead be limited to a family name |
From @mikemorris on June 3, 2015 21:22 Hah, wow, so weights and variants should be present in the font file according to the OpenType spec, even though it doesn't look like FreeType can read them directly. Chromium's blink engine is constructing a bitmask to match against those. |
From @mikemorris on June 3, 2015 21:53 The |
From @mikemorris on June 3, 2015 22:17 We may be able to read metrics from the OS/2 table by building on @lbud's work in node-fontnik/tables and passing the |
From @peterqliu on June 3, 2015 22:25 Added wrinkle (or maybe the same wrinkle): if we decouple family and style, what happens when a stylesheet specs a style that doesn't exist for the family? Would there have to be a fallback style, as well? Would probably run into this a lot if you're trying out different families for size, or (in the future) custom uploading only one weight for your type family. |
From @nickidlugash on June 3, 2015 23:31
Wouldn't the editor only enable you to choose from styles that do exist? It would be possible to hand-write invalid combinations, but currently you can hand-write invalid strings for font names as well. |
From @samanpwbb on June 3, 2015 23:39 How would this work with user fonts? We can't expect all fonts uploaded to have the metadata necessary to expect to split family from style, can we? |
From @nickidlugash on June 4, 2015 0:30
I'm not sure – @mikemorris? |
From @lbud on June 4, 2015 1:8 @samanpwbb I would actually expect nearly all to have at least that metadata, except for maybe amateur handcrafted fonts, which we would probably determine family= Actually, if anyone has some really obscure/amateur fonts,
(as specified here) you'll be able to tell if they have a |
From @samanpwbb on June 4, 2015 1:10 Oh wow, in that case I am definitely in favor of separating style and family. There are a lot of advantages. I'm sure we could figure something out for the few cases that don't provide the metadata. |
From @mikemorris on June 8, 2015 13:35
Yep, we can definitely get this much from FreeType. More specific details like weight (numerical value as opposed to just a string) may be specific to OpenType fonts. |
From @mikemorris on June 9, 2015 19:21
Ugh. This makes things a little more complicated on the backend, but for the purpose of the style spec I think it just means |
This issue was moved to #4091 |
Closing here; see #6584. |
From @nickidlugash on June 3, 2015 20:16
Right now a font is specified with a string that concatenates font family and style, e.g. "Open Sans Regular". If we split it up, we can implement smart fallbacks based on style.
/cc @mikemorris
Copied from original issue: mapbox/mapbox-gl-style-spec#284
The text was updated successfully, but these errors were encountered: