Difference between revisions of "Fonts/Typescripts examples/Roboto Typescript"
m |
(some updates to this incomplete and outdated page) |
||
Line 6: | Line 6: | ||
== Task == | == Task == | ||
− | + | Use Roboto Slab as roman, Roboto as sans and Roboto Mono as, well, mono. Also provide normal and condensed sans. | |
== Requirements == | == Requirements == | ||
− | + | Download the Roboto fonts from Google’s Github projects ([https://github.com/google/roboto/releases|Roboto Sans and Mono], [https://github.com/googlefonts/robotoslab/tree/master/fonts/static|Roboto Slab]), from [https://fonts.google.com/?query=Roboto|Google Fonts] or several other font pages. | |
− | + | Put the font files e.g. in <tt>texmf-fonts/fonts/truetype/google/roboto</tt> and reload the font database: | |
− | + | mtxrun --script fonts --reload | |
− | + | Check if ConTeXt can find them: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | mtxrun --script fonts --list --all --pattern=robot | |
− | + | That should result in something like this: | |
− | + | identifier familyname fontname filename subfont instances | |
+ | |||
+ | roboto roboto robotoregular Roboto-Regular.ttf | ||
+ | robotoblack roboto robotoblack Roboto-Black.ttf | ||
+ | robotoblackitalic roboto robotoblackitalic Roboto-BlackItalic.ttf | ||
+ | robotobold roboto robotobold Roboto-Bold.ttf | ||
+ | robotobolditalic roboto robotobolditalic Roboto-BoldItalic.ttf | ||
+ | robotocondensed robotocondensed robotocondensedregular RobotoCondensed-Regular.ttf | ||
+ | robotocondensedbold robotocondensed robotocondensedbold RobotoCondensed-Bold.ttf | ||
+ | robotocondensedbolditalic robotocondensed robotocondensedbolditalic RobotoCondensed-BoldItalic.ttf | ||
+ | robotocondenseditalic robotocondensed robotocondenseditalic RobotoCondensed-Italic.ttf | ||
+ | robotocondensedlight robotocondensed robotocondensedlight RobotoCondensed-Light.ttf | ||
+ | robotocondensedlightitalic robotocondensed robotocondensedlightitalic RobotoCondensed-LightItalic.ttf | ||
+ | robotocondensednormal robotocondensed robotocondenseditalic RobotoCondensed-Italic.ttf | ||
+ | robotocondensedregular robotocondensed robotocondensedregular RobotoCondensed-Regular.ttf | ||
+ | robotoitalic roboto robotoitalic Roboto-Italic.ttf | ||
+ | robotolight roboto robotolight Roboto-Light.ttf | ||
+ | robotolightitalic roboto robotolightitalic Roboto-LightItalic.ttf | ||
+ | robotomedium roboto robotomedium Roboto-Medium.ttf | ||
+ | robotomediumitalic roboto robotomediumitalic Roboto-MediumItalic.ttf | ||
+ | robotomono robotomono robotomonoregular RobotoMono-Regular.ttf | ||
+ | robotomonobold robotomono robotomonobold RobotoMono-Bold.ttf | ||
+ | robotomonobolditalic robotomono robotomonobolditalic RobotoMono-BoldItalic.ttf | ||
+ | robotomonoitalic robotomono robotomonoitalic RobotoMono-Italic.ttf | ||
+ | robotomonolight robotomono robotomonolight RobotoMono-Light.ttf | ||
+ | robotomonolightitalic robotomono robotomonolightitalic RobotoMono-LightItalic.ttf | ||
+ | robotomonomedium robotomono robotomonomedium RobotoMono-Medium.ttf | ||
+ | robotomonomediumitalic robotomono robotomonomediumitalic RobotoMono-MediumItalic.ttf | ||
+ | robotomononormal robotomono robotomonoitalic RobotoMono-Italic.ttf | ||
+ | robotomonoregular robotomono robotomonoregular RobotoMono-Regular.ttf | ||
+ | robotomonothin robotomono robotomonothin RobotoMono-Thin.ttf | ||
+ | robotomonothinitalic robotomono robotomonothinitalic RobotoMono-ThinItalic.ttf | ||
+ | robotonormal roboto robotoitalic Roboto-Italic.ttf | ||
+ | robotoregular roboto robotoregular Roboto-Regular.ttf | ||
+ | robotoslabblack robotoslab robotoslabblack RobotoSlab-Black.ttf | ||
+ | robotoslabbold robotoslab robotoslabbold RobotoSlab-Bold.ttf | ||
+ | robotoslabextrabold robotoslab robotoslabextrabold RobotoSlab-ExtraBold.ttf | ||
+ | robotoslabextralight robotoslab robotoslabextralight RobotoSlab-ExtraLight.ttf | ||
+ | robotoslablight robotoslab robotoslablight RobotoSlab-Light.ttf | ||
+ | robotoslabmedium robotoslab robotoslabmedium RobotoSlab-Medium.ttf | ||
+ | robotoslabnormal robotoslab robotoslabregular RobotoSlab-Regular.ttf | ||
+ | robotoslabregular robotoslab robotoslabregular RobotoSlab-Regular.ttf | ||
+ | robotoslabsemibold robotoslab robotoslabsemibold RobotoSlab-SemiBold.ttf | ||
+ | robotoslabthin robotoslab robotoslabthin RobotoSlab-Thin.ttf | ||
+ | robotothin roboto robotothin Roboto-Thin.ttf | ||
+ | robotothinitalic roboto robotothinitalic Roboto-ThinItalic.ttf | ||
+ | |||
+ | |||
+ | Now we need to write a typescript... (TODO) | ||
== Problem == | == Problem == | ||
− | + | ConTeXt only offers two different font weights inside a typescript definition - Roboto offers six different font weights. | |
+ | A typescript definition also does’t know font variants and Roboto Sans offers two (normal and condensed). | ||
− | == | + | == Solution == |
− | + | You need to pair the specific weight and variants you want in your document. |
Revision as of 22:38, 7 January 2020
In progress...
Contents
Task
Use Roboto Slab as roman, Roboto as sans and Roboto Mono as, well, mono. Also provide normal and condensed sans.
Requirements
Download the Roboto fonts from Google’s Github projects (Sans and Mono, Slab), from Fonts or several other font pages.
Put the font files e.g. in texmf-fonts/fonts/truetype/google/roboto and reload the font database:
mtxrun --script fonts --reload
Check if ConTeXt can find them:
mtxrun --script fonts --list --all --pattern=robot
That should result in something like this:
identifier familyname fontname filename subfont instances roboto roboto robotoregular Roboto-Regular.ttf robotoblack roboto robotoblack Roboto-Black.ttf robotoblackitalic roboto robotoblackitalic Roboto-BlackItalic.ttf robotobold roboto robotobold Roboto-Bold.ttf robotobolditalic roboto robotobolditalic Roboto-BoldItalic.ttf robotocondensed robotocondensed robotocondensedregular RobotoCondensed-Regular.ttf robotocondensedbold robotocondensed robotocondensedbold RobotoCondensed-Bold.ttf robotocondensedbolditalic robotocondensed robotocondensedbolditalic RobotoCondensed-BoldItalic.ttf robotocondenseditalic robotocondensed robotocondenseditalic RobotoCondensed-Italic.ttf robotocondensedlight robotocondensed robotocondensedlight RobotoCondensed-Light.ttf robotocondensedlightitalic robotocondensed robotocondensedlightitalic RobotoCondensed-LightItalic.ttf robotocondensednormal robotocondensed robotocondenseditalic RobotoCondensed-Italic.ttf robotocondensedregular robotocondensed robotocondensedregular RobotoCondensed-Regular.ttf robotoitalic roboto robotoitalic Roboto-Italic.ttf robotolight roboto robotolight Roboto-Light.ttf robotolightitalic roboto robotolightitalic Roboto-LightItalic.ttf robotomedium roboto robotomedium Roboto-Medium.ttf robotomediumitalic roboto robotomediumitalic Roboto-MediumItalic.ttf robotomono robotomono robotomonoregular RobotoMono-Regular.ttf robotomonobold robotomono robotomonobold RobotoMono-Bold.ttf robotomonobolditalic robotomono robotomonobolditalic RobotoMono-BoldItalic.ttf robotomonoitalic robotomono robotomonoitalic RobotoMono-Italic.ttf robotomonolight robotomono robotomonolight RobotoMono-Light.ttf robotomonolightitalic robotomono robotomonolightitalic RobotoMono-LightItalic.ttf robotomonomedium robotomono robotomonomedium RobotoMono-Medium.ttf robotomonomediumitalic robotomono robotomonomediumitalic RobotoMono-MediumItalic.ttf robotomononormal robotomono robotomonoitalic RobotoMono-Italic.ttf robotomonoregular robotomono robotomonoregular RobotoMono-Regular.ttf robotomonothin robotomono robotomonothin RobotoMono-Thin.ttf robotomonothinitalic robotomono robotomonothinitalic RobotoMono-ThinItalic.ttf robotonormal roboto robotoitalic Roboto-Italic.ttf robotoregular roboto robotoregular Roboto-Regular.ttf robotoslabblack robotoslab robotoslabblack RobotoSlab-Black.ttf robotoslabbold robotoslab robotoslabbold RobotoSlab-Bold.ttf robotoslabextrabold robotoslab robotoslabextrabold RobotoSlab-ExtraBold.ttf robotoslabextralight robotoslab robotoslabextralight RobotoSlab-ExtraLight.ttf robotoslablight robotoslab robotoslablight RobotoSlab-Light.ttf robotoslabmedium robotoslab robotoslabmedium RobotoSlab-Medium.ttf robotoslabnormal robotoslab robotoslabregular RobotoSlab-Regular.ttf robotoslabregular robotoslab robotoslabregular RobotoSlab-Regular.ttf robotoslabsemibold robotoslab robotoslabsemibold RobotoSlab-SemiBold.ttf robotoslabthin robotoslab robotoslabthin RobotoSlab-Thin.ttf robotothin roboto robotothin Roboto-Thin.ttf robotothinitalic roboto robotothinitalic Roboto-ThinItalic.ttf
Now we need to write a typescript... (TODO)
Problem
ConTeXt only offers two different font weights inside a typescript definition - Roboto offers six different font weights. A typescript definition also does’t know font variants and Roboto Sans offers two (normal and condensed).
Solution
You need to pair the specific weight and variants you want in your document.