Difference between revisions of "Roboto Typescript"

From Wiki
Jump to navigation Jump to search
m
(some updates to this incomplete and outdated page)
Line 6: Line 6:
 
== Task ==
 
== Task ==
  
To map Roboto Slab on rm-fonts and Robonto (normal and condensed) on ss-fonts.
+
Use Roboto Slab as roman, Roboto as sans and Roboto Mono as, well, mono. Also provide normal and condensed sans.
  
 
== Requirements ==
 
== Requirements ==
  
The Roboto fonts are installed at your System and also recognized by ConTeXt. If
+
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.
  
mtxrun --script fonts --list --all --pattern=roboto*
+
Put the font files e.g. in <tt>texmf-fonts/fonts/truetype/google/roboto</tt> and reload the font database:
  
does not shows you minimum:
+
  mtxrun --script fonts --reload
  
roboto                      robotoblack                  Roboto-Black.otf
+
Check if ConTeXt can find them:
robotoblack                  robotoblack                  Roboto-Black.otf
 
robotoblackitalic            robotoblackitalic            Roboto-BlackItalic.otf
 
robotobold                  robotobold                  Roboto-Bold.otf
 
robotobolditalic            robotobolditalic            Roboto-BoldItalic.otf
 
robotocondensed              robotocondensedbold          RobotoCondensed-Bold.otf
 
robotocondensedbold          robotocondensedbold          RobotoCondensed-Bold.otf
 
robotocondensedbolditalic    robotocondensedbolditalic    RobotoCondensed-BoldItalic.otf
 
robotocondenseditalic        robotocondenseditalic        RobotoCondensed-Italic.otf
 
robotocondensedlight        robotocondensedlight        RobotoCondensed-Light.otf
 
robotocondensedlightitalic  robotocondensedlightitalic  RobotoCondensed-LightItalic.otf
 
robotocondensednormal        robotocondenseditalic        RobotoCondensed-Italic.otf
 
robotocondensedregular      robotocondensedregular      RobotoCondensed-Regular.otf
 
robotoitalic                robotoitalic                Roboto-Italic.otf
 
robotolight                  robotolight                  Roboto-Light.otf
 
robotolightitalic            robotolightitalic            Roboto-LightItalic.otf
 
robotomedium                robotomedium                Roboto-Medium.otf
 
robotomediumitalic          robotomediumitalic          Roboto-MediumItalic.otf
 
robotonormal                robotoitalic                Roboto-Italic.otf
 
robotoregular                robotoregular                Roboto-Regular.otf
 
robotoslab                  robotoslabbold              RobotoSlab-Bold.ttf
 
robotoslabbold              robotoslabbold              RobotoSlab-Bold.ttf
 
robotoslablight              robotoslablight              RobotoSlab-Light.ttf
 
robotoslabnormal            robotoslabregular            RobotoSlab-Regular.ttf
 
robotoslabregular            robotoslabregular            RobotoSlab-Regular.ttf
 
robotoslabthin              robotoslabthin              RobotoSlab-Thin.ttf
 
robotothin                  robotothin                  Roboto-Thin.otf
 
robotothinitalic            robotothinitalic            Roboto-ThinItalic.otf
 
  
please visit the instruction [[Fonts_in_LuaTeX#Building_the_font_database|how to install fonts to MkIV]].
+
  mtxrun --script fonts --list --all --pattern=robot
  
You can download the roboto fonts from google's webfonts and then convert them from woff into otf via fontforge.
+
That should result in something like this:
  
You do not have to use this Roboto fonts. For this example you can use any Unicode font you like. If you use different fonts do not forget to exchange the font names in the example script below.
+
  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 ==
  
At this moment ConTeXt only offers two different font weights inside a typescript definition - roboto offers six different font weights. A typescript definiton also does not know font variants and roboto sans offers two (normal and condensed).
+
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).
  
== Script ==
+
== Solution ==
  
Solution: you need to pair the specific weight and variants you need in your document.
+
You need to pair the specific weight and variants you want in your document.

Revision as of 22:38, 7 January 2020

In progress...


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.