![]() ![]() However, it looks like it is possible for teams to set things up so that the font family a designer picks from the dropdown in their design tool, matches the font family a developer writes into their code. How tools & platforms actually map a font family + weight + style back to a downloaded / bundled / pre-installed font file does seem to vary quite a bit. This gives me some confidence that font families is the right concept to be expressing as a token, rather than font faces. Once a font has been selected, other controls are used to pick the weight and style. However, the listed options are really font families as they will be things like "Times New Roman" and not "Times New Roman Bold, Times New Roman Bold Italic", etc. When styling text, designers typically choose a "font" from a dropdown. Developers can create font family resources in a similar fashion to rules in CSS.ĭesign tools like Figma & Sketch also seem to have a similar concept (thought they don't explicitly call it font families). ![]() ![]() In the absence of a for the specified font family, browsers will instead look at the fonts installed on the user's system.īased a quick read of their docs, it looks like Android has a similar concept of font families. In CSS, authors can define that mapping themselves via rules. When styling text in CSS, the font family is combined with font style & weight properties and the browser / OS then figures out how to display that (which will often involve mapping the font face back to the corresponding font file and loading that). In CSS, a "font family" is a name assigned to a group of related font faces. In many cases, there are individual font files for each of the faces, though in some cases there may be a single variable font file that covers all of those faces. What is the expected behaviour in a tool or platform that does not support CSS-like font stacks, when it encounters a fontFamily token with an array value?įWIW, my suggestions for each are as follows: 1) Meaning of fontFamily valuesįonts are typically made up of several font faces, which are different combinations of weight (bold, light, regular, etc.) and/or style (italic or normal).Should our spec define a set of generic font families (like CSS has) that can be used? What would that mean for platforms and design tools that don't have that concept?.What do the font names listed as the value(s) of a fontFamily actually represent? (and how do they map to actual font files or pre-installed fonts on a user's system?).While updates to the spec draft have addressed things like font weight and typography styles, I think the spec needs to still clarify the following for the fontFamily type: Looking at OP, I think the original issue is still unresolved. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |