ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Different font variants (normal <> condensed, light <> regular <> bold, etc.)
@ 2013-07-09 11:20 Zenlima
  2013-07-09 15:58 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Zenlima @ 2013-07-09 11:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

I am trying to define the different variants of the Roboto font ([1]
for sans and [2][3][4][5] for serif).

Now I am trying to define this for context but I have no idea how to
define the condensed versions (plus how to access it later). And how
do I enter and access the different weights next to regular and
bold (light, thin, heavy)? And how to define the weight
light as default (instead of regular)? I got so far:

--------8<--------------------------
\enableregime[utf]

\definefontfeature[Latn-smallcaps][smcp=yes,script=latn,kern=yes]
\definefontfeature[fakeitalic][default][slant=.25]

\definefontfeature[arab][mode=node,language=dflt,script=arab,init=yes,medi=yes,fina=yes,isol=yes,liga=yes,dlig=yes,rlig=yes,clig=yes,mark=yes,mkmk=yes,kern=yes,curs=yes]

\definefontsynonym
[arab--scheherazade--serif][name:scheherazade][features=arab]
\definefontsynonym[brai--6punktoj][name:6punktoj] %^1

\starttypescript[sans][roboto]
\definefontfallback[Sans][brai--6punktoj][0x2800-0x283f][force=yes,check=no]
\definefontfallback[Sans][arab--scheherazade--serif][0x0600-0x06ff,0x0750-0x077f,0xfb50-0xfdff,0xfe70-0xfefe][force=yes,check=no,rscale=1.9]
\definefontsynonym[Sans][name:robotoregular][fallbacks=Sans]
\definefontsynonym[SansBold][name:robotobold]
\definefontsynonym[SansItalic][name:robotoitalic]
\definefontsynonym[SansSlanted][name:robotoitalic]
\definefontsynonym[SansBoldItalic][name:robotobolditalic]
\definefontsynonym[SansBoldSlanted][name:robotobolditalic]
\definefontsynonym[SansCaps][name:robotoregular][features=Latn-smallcaps]
\stoptypescript

\starttypescript[serif][roboto] 
\definefontfallback[Serif][brai--6punktoj][0x2800-0x283f][force=yes,check=no]
\definefontfallback[Serif][arab--scheherazade--serif][0x0600-0x06ff,0x0750-0x077f,0xfb50-0xfdff,0xfe70-0xfefe][force=yes,check=no,rscale=1.9]
\definefontsynonym[Serif][name:robotoslabregular][fallbacks=Serif]
\definefontsynonym[SerifBold][name:robotoslabbold]
\definefontsynonym[SerifItalic][name:robotoslabregular][features=fakeitalic]
\definefontsynonym[SerifSlanted][name:robotoslabregular][features=fakeitalic]
\definefontsynonym[SerifBoldItalic][name:robotoslabbold][features=fakeitalic]
\definefontsynonym[SerifBoldSlanted][name:robotoslabbold][features=fakeitalic]
\definefontsynonym[SerifCaps][name:robotoslabregular][features=Latn-smallcaps] 
\stoptypescript

\definetypeface[fliesstext][rm][serif][roboto] 
\definetypeface[fliesstext][ss][sans][roboto] 

\setupbodyfont[fliesstext,rm,11pt]


----8<------------------------------------------

Any help is appreciated :-)


1) That braille font is created by myself and will be published for
   ConTeXt soon - still a little rocky.

[1] https://dl-ssl.google.com/android/design/Roboto_Hinted_20111129.zip
[2] http://ff.static.1001fonts.net/r/o/roboto-slab.regular.ttf
[3] http://ff.static.1001fonts.net/r/o/roboto-slab.thin.ttf
[4] http://ff.static.1001fonts.net/r/o/roboto-slab.light.ttf
[5] http://ff.static.1001fonts.net/r/o/roboto-slab.bold.ttf
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Different font variants (normal <> condensed, light <> regular <> bold, etc.)
  2013-07-09 11:20 Different font variants (normal <> condensed, light <> regular <> bold, etc.) Zenlima
@ 2013-07-09 15:58 ` Wolfgang Schuster
  2013-07-11 10:02   ` Zenlima
  2013-07-11 10:04   ` Zenlima
  0 siblings, 2 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2013-07-09 15:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 2838 bytes --]


Am 09.07.2013 um 13:20 schrieb Zenlima <post@zenlima.eu>:

> Hi,
> 
> I am trying to define the different variants of the Roboto font ([1]
> for sans and [2][3][4][5] for serif).
> 
> Now I am trying to define this for context but I have no idea how to
> define the condensed versions (plus how to access it later). And how
> do I enter and access the different weights next to regular and
> bold (light, thin, heavy)? And how to define the weight
> light as default (instead of regular)? I got so far:
> 
> --------8<--------------------------
> \enableregime[utf]
> 
> \definefontfeature[Latn-smallcaps][smcp=yes,script=latn,kern=yes]
> \definefontfeature[fakeitalic][default][slant=.25]
> 
> \definefontfeature[arab][mode=node,language=dflt,script=arab,init=yes,medi=yes,fina=yes,isol=yes,liga=yes,dlig=yes,rlig=yes,clig=yes,mark=yes,mkmk=yes,kern=yes,curs=yes]
> 
> \definefontsynonym
> [arab--scheherazade--serif][name:scheherazade][features=arab]
> \definefontsynonym[brai--6punktoj][name:6punktoj] %^1
> 
> \starttypescript[sans][roboto]
> \definefontfallback[Sans][brai--6punktoj][0x2800-0x283f][force=yes,check=no]
> \definefontfallback[Sans][arab--scheherazade--serif][0x0600-0x06ff,0x0750-0x077f,0xfb50-0xfdff,0xfe70-0xfefe][force=yes,check=no,rscale=1.9]
> \definefontsynonym[Sans][name:robotoregular][fallbacks=Sans]
> \definefontsynonym[SansBold][name:robotobold]
> \definefontsynonym[SansItalic][name:robotoitalic]
> \definefontsynonym[SansSlanted][name:robotoitalic]
> \definefontsynonym[SansBoldItalic][name:robotobolditalic]
> \definefontsynonym[SansBoldSlanted][name:robotobolditalic]
> \definefontsynonym[SansCaps][name:robotoregular][features=Latn-smallcaps]
> \stoptypescript
> 
> \starttypescript[serif][roboto] 
> \definefontfallback[Serif][brai--6punktoj][0x2800-0x283f][force=yes,check=no]
> \definefontfallback[Serif][arab--scheherazade--serif][0x0600-0x06ff,0x0750-0x077f,0xfb50-0xfdff,0xfe70-0xfefe][force=yes,check=no,rscale=1.9]
> \definefontsynonym[Serif][name:robotoslabregular][fallbacks=Serif]
> \definefontsynonym[SerifBold][name:robotoslabbold]
> \definefontsynonym[SerifItalic][name:robotoslabregular][features=fakeitalic]
> \definefontsynonym[SerifSlanted][name:robotoslabregular][features=fakeitalic]
> \definefontsynonym[SerifBoldItalic][name:robotoslabbold][features=fakeitalic]
> \definefontsynonym[SerifBoldSlanted][name:robotoslabbold][features=fakeitalic]
> \definefontsynonym[SerifCaps][name:robotoslabregular][features=Latn-smallcaps] 
> \stoptypescript
> 
> \definetypeface[fliesstext][rm][serif][roboto] 
> \definetypeface[fliesstext][ss][sans][roboto] 
> 
> \setupbodyfont[fliesstext,rm,11pt]
> 
> 
> ----8<------------------------------------------
> 
> Any help is appreciated :-)

Try the two attached files (untested):


[-- Attachment #2: roboto-test.tex --]
[-- Type: application/octet-stream, Size: 316 bytes --]

\starttext

\switchtobodyfont[roboto]

\rm\input ward\par
\ss\input ward

\blank

\switchtobodyfont[roboto-condensed]

\rm\input ward\par
\ss\input ward

\blank

\switchtobodyfont[roboto-medium]

\rm\input ward\par
\ss\input ward

\blank

\switchtobodyfont[roboto-light]

\rm\input ward\par
\ss\input ward

\stoptext

[-- Attachment #3: type-roboto.tex --]
[-- Type: application/octet-stream, Size: 1934 bytes --]

\starttypescriptcollection [roboto]

\starttypescript [sans] [roboto]
  \setups[font:fallback:sans]
  \definefontsynonym [Sans]           [file:robotoregular]
  \definefontsynonym [SansItalic]     [file:robotoitalic]
  \definefontsynonym [SansBold]       [file:robotobold]
  \definefontsynonym [SansBoldItalic] [file:robotobolditalic]
\stoptypescript

\starttypescript [sans] [roboto-condensed]
  \definefontsynonym [Sans]           [file:robotocondensed]
  \definefontsynonym [SansItalic]     [file:robotocondenseditalic]
  \definefontsynonym [SansBold]       [file:robotoboldcondensed]
  \definefontsynonym [SansBoldItalic] [file:robotoboldcondenseditalic]
\stoptypescript

\starttypescript [sans] [roboto-medium]
  \definefontsynonym [Sans]           [file:robotomedium]
  \definefontsynonym [SansItalic]     [file:robotomediumitalic]
  \definefontsynonym [SansBold]       [file:robotoblack]
  \definefontsynonym [SansBoldItalic] [file:robotoblackitalic]
\stoptypescript

\starttypescript [sans] [roboto-light]
  \definefontsynonym [Sans]           [file:robotolight]
  \definefontsynonym [SansItalic]     [file:robotolightitalic]
  \definefontsynonym [SansBold]       [file:robotoregular]
  \definefontsynonym [SansBoldItalic] [file:robotoitalic]
\stoptypescript

\starttypescript [serif] [roboto,roboto-condensed,roboto-medium]
  \definefontsynonym [Serif]     [file:robotoslabregular]
  \definefontsynonym [SerifBold] [file:robotoslabbold]
\stoptypescript

\starttypescript [serif] [roboto-light]
  \definefontsynonym [Serif]     [file:robotoslablight]
  \definefontsynonym [SerifBold] [file:robotoslabregular]
\stoptypescript

\starttypescript [roboto,roboto-condensed,roboto-medium,roboto-light]
  \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default] [features=default]
  \definetypeface [\typescriptone] [rm] [sans]  [\typescriptone] [default] [features=default]
\stoptypescript

\stoptypescriptcollection

[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Different font variants (normal <> condensed, light <> regular <> bold, etc.)
  2013-07-09 15:58 ` Wolfgang Schuster
@ 2013-07-11 10:02   ` Zenlima
  2013-07-11 10:04   ` Zenlima
  1 sibling, 0 replies; 5+ messages in thread
From: Zenlima @ 2013-07-11 10:02 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 774 bytes --]

Thanks Wolfgang,

your example works. :)

For understanding I tried to make the example script-name independent,
so it doesn't fix my environment onto one specific script (see attached
files). But there must be some secret naming conventions.. then I guess
and entered a command to switch to the roboto-typescripcollection.. but
I guess wrongly. Are all secret (font) naming conventions somewhere
documented?

I think the limitation of font-dimensions decreases the reuse ability
of context/mkiv a lot. Also I found some thoughts that were made in the
context community some time ago:

	http://meeting.contextgarden.net/2010/talks/2010-09-15-mojca-fonts/some-thoughts-about-typescripts.pdf

Is there any progress in that direction with context/mkiv?

H.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Different font variants (normal <> condensed, light <> regular <> bold, etc.)
  2013-07-09 15:58 ` Wolfgang Schuster
  2013-07-11 10:02   ` Zenlima
@ 2013-07-11 10:04   ` Zenlima
  2013-07-11 18:41     ` Wolfgang Schuster
  1 sibling, 1 reply; 5+ messages in thread
From: Zenlima @ 2013-07-11 10:04 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1.1: Type: text/plain, Size: 774 bytes --]

Thanks Wolfgang,

your example works. :)

For understanding I tried to make the example script-name independent,
so it doesn't fix my environment onto one specific script (see attached
files). But there must be some secret naming conventions.. then I guess
and entered a command to switch to the roboto-typescripcollection.. but
I guess wrongly. Are all secret (font) naming conventions somewhere
documented?

I think the limitation of font-dimensions decreases the reuse ability
of context/mkiv a lot. Also I found some thoughts that were made in the
context community some time ago:

	http://meeting.contextgarden.net/2010/talks/2010-09-15-mojca-fonts/some-thoughts-about-typescripts.pdf

Is there any progress in that direction with context/mkiv?

H.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: roboto-test.tex --]
[-- Type: text/x-tex, Size: 401 bytes --]

\starttext

%\usetypescriptcollection[roboto]

\switchtobodyfont[400-700--normal]

\rm\input ward\par
\ss\input ward

\blank

\switchtobodyfont[400-700--consended]

\rm\input ward\par
\ss\input ward

\blank


\switchtobodyfont[500-700--normal]

\rm\input ward\par
\ss\input ward

\blank

\switchtobodyfont[300-400--normal]

\rm\input ward\par
\ss\input ward

\stoptext

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.3: type-roboto.tex --]
[-- Type: text/x-tex, Size: 2030 bytes --]

\starttypescriptcollection [roboto]

\starttypescript [sans] [400-700--normal]
  \setups[font:fallback:sans]
  \definefontsynonym [Sans]           [file:robotoregular]
  \definefontsynonym [SansItalic]     [file:robotoitalic]
  \definefontsynonym [SansBold]       [file:robotobold]
  \definefontsynonym [SansBoldItalic] [file:robotobolditalic]
\stoptypescript

\starttypescript [sans] [400-700--condensed]
  \definefontsynonym [Sans]           [file:robotocondensed]
  \definefontsynonym [SansItalic]     [file:robotocondenseditalic]
  \definefontsynonym [SansBold]       [file:robotoboldcondensed]
  \definefontsynonym [SansBoldItalic] [file:robotoboldcondenseditalic]
\stoptypescript

\starttypescript [sans] [500-800--normal]
  \definefontsynonym [Sans]           [file:robotomedium]
  \definefontsynonym [SansItalic]     [file:robotomediumitalic]
  \definefontsynonym [SansBold]       [file:robotoblack]
  \definefontsynonym [SansBoldItalic] [file:robotoblackitalic]
\stoptypescript

\starttypescript [sans] [300-400--normal]
  \definefontsynonym [Sans]           [file:robotolight]
  \definefontsynonym [SansItalic]     [file:robotolightitalic]
  \definefontsynonym [SansBold]       [file:robotoregular]
  \definefontsynonym [SansBoldItalic] [file:robotoitalic]
\stoptypescript

\starttypescript [serif] [400-700--normal,400-700--condensed,500-800--normal]
  \definefontsynonym [Serif]     [file:robotoslabregular]
  \definefontsynonym [SerifBold] [file:robotoslabbold]
\stoptypescript

\starttypescript [serif] [300-400--normal]
  \definefontsynonym [Serif]     [file:robotoslablight]
  \definefontsynonym [SerifBold] [file:robotoslabregular]
\stoptypescript

\starttypescript [400-700--normal,400-700--consended,500-800--normal,300-400--normal]
  \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default] [features=default]
  \definetypeface [\typescriptone] [rm] [sans]  [\typescriptone] [default] [features=default]
\stoptypescript

\stoptypescriptcollection

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Different font variants (normal <> condensed, light <> regular <> bold, etc.)
  2013-07-11 10:04   ` Zenlima
@ 2013-07-11 18:41     ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2013-07-11 18:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 11.07.2013 um 12:04 schrieb Zenlima <post@zenlima.eu>:

> Thanks Wolfgang,
> 
> your example works. :)
> 
> For understanding I tried to make the example script-name independent,
> so it doesn't fix my environment onto one specific script (see attached
> files). But there must be some secret naming conventions.. then I guess
> and entered a command to switch to the roboto-typescripcollection.. but
> I guess wrongly. Are all secret (font) naming conventions somewhere
> documented?

I don’t know what you mean by secret names but your example doesn’t
work because you don’t load the typescripts. When you add

  \usetypescriptfile[roboto]

your example should example. This line wasn’t necessary in my example
because “roboto” was part of the typeface names (which is used with
\switchtobodyfont) and context was able to load the file itself because
the file has also the name roboto but in your case the typeface has
the name “400-700--normal”.

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-07-11 18:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-09 11:20 Different font variants (normal <> condensed, light <> regular <> bold, etc.) Zenlima
2013-07-09 15:58 ` Wolfgang Schuster
2013-07-11 10:02   ` Zenlima
2013-07-11 10:04   ` Zenlima
2013-07-11 18:41     ` Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).