Best way to access casul fonts
![](https://secure.gravatar.com/avatar/1050dd51a9fcfef3b861ddaa5ab5f9a7.jpg?s=120&d=mm&r=g)
Hi, I'm trying to access Lucida Casual. I see in type-imp-lucida-typeone.mkiv that there is, indeed, a typescript for it, but I can't figure out how to switch to it. That is, I want to make some text be Lucida Casual. I gather from a previous thread that I should be using \definefontstyle, but I don't know how to go about this. Currently I'm just defining a new typescript and making Lucida Casual a synonym for Serif and then using \switchtobodyfont --- but this feel silly. I searched the wiki and skimmed the reference manual, but to no avail. Perhaps I don't know what I should be looking for. Any help would be appreciated. What's the easiest way to access a casual font? What's the cleanest way? Thanks, Mattias Märka
![](https://secure.gravatar.com/avatar/7e7bc1eea93face7f7412b7a2300418f.jpg?s=120&d=mm&r=g)
Hi, Following the instruction from : https://wiki.contextgarden.net/Use_the_fonts_you_want mtxrun --script font --list --file -pattern=*casual* gives : familyname weight style width variant fontname filename subfont fontweight lucidacasual normal normal normal normal lucidacasual /home/xxxx/.fonts/LucidaCasual.ttf Then the following code should work : \starttypescript [myserif] \definefontsynonym[LucidaCasual-Regular] [file:LucidaCasual.ttf] \stoptypescript \starttypescript [myserif] \setups[font:fallback:serif] \definefontsynonym[Serif] [LucidaCasual-Regular] [features=default] \stoptypescript \starttypescript [myserif] \definetypeface [myserif] [rm] [serif] [myserif] [default] \stoptypescript \setupbodyfont[12pt] \starttext The quick brown fox jumps over the lazy dog \setupbodyfont[myserif] The quick brown fox jumps over the lazy dog \stoptext
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 1/23/23 19:04, Mattias Märka via ntg-context wrote:
Hi,
I'm trying to access Lucida Casual.
Hi Matthias, With a relatively recent version of ConTeXt (LMTX or MkIV), the following should work: \definefontfamily[myserif][rm][Lucida Casual] \starttext The quick brown fox jumps over the lazy dog. \setupbodyfont[myserif] The quick brown fox jumps over the lazy dog. \stoptext This is the easiest way to access it. Another question would be how to mix a casual font with serif, sans-serif and mono typefaces. Just in case it might help, Pablo
![](https://secure.gravatar.com/avatar/1050dd51a9fcfef3b861ddaa5ab5f9a7.jpg?s=120&d=mm&r=g)
Hi Pablo,
Yes, I want to mix casual with serif, sans-serif and so on. Sorry, I wasn't clear in my original message.
What Garulfo suggested is what I've been doing.
Mattias
------- Original Message -------
On Monday, January 23rd, 2023 at 9:10 PM, Pablo Rodriguez via ntg-context
On 1/23/23 19:04, Mattias Märka via ntg-context wrote:
Hi,
I'm trying to access Lucida Casual.
Hi Matthias,
With a relatively recent version of ConTeXt (LMTX or MkIV), the following should work:
\definefontfamily[myserif][rm][Lucida Casual] \starttext The quick brown fox jumps over the lazy dog.
\setupbodyfont[myserif] The quick brown fox jumps over the lazy dog. \stoptext
This is the easiest way to access it.
Another question would be how to mix a casual font with serif, sans-serif and mono typefaces.
Just in case it might help,
Pablo ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 1/23/23 20:32, Mattias Märka via ntg-context wrote:
Hi Pablo,
Yes, I want to mix casual with serif, sans-serif and so on. Hi Mattias (please, excuse my previous misspelling of your name),
here you have it: \definefontfamily[mainface][rm][TeX Gyre Pagella] \definefontfamily[mainface][ss][TeX Gyre Heros] \definefontfamily[mainface][tt][TeX Gyre Cursor] \definefontfamily[mainface][hw][Lucida Casual] \definefontfamily[mainface][cg][Lucida Casual] \setupbodyfont[mainface] \starttext \doloopoverlist{\rm,\ss,\tt,\hw,\cg} {{\recursestring% The quick brown fox jumps over the lazy dog.\par}} \stoptext Lucida Casual is handwriting and calligraphy in the sample. But you only need one of them. I hope it helps, Pablo
![](https://secure.gravatar.com/avatar/1050dd51a9fcfef3b861ddaa5ab5f9a7.jpg?s=120&d=mm&r=g)
Hi
This is probably the most reasonable solution.
Thanks
Mattias
------- Original Message -------
On Tuesday, January 24th, 2023 at 9:41 AM, Pablo Rodriguez via ntg-context
On 1/23/23 20:32, Mattias Märka via ntg-context wrote:
Hi Pablo,
Yes, I want to mix casual with serif, sans-serif and so on.
Hi Mattias (please, excuse my previous misspelling of your name),
here you have it:
\definefontfamily[mainface][rm][TeX Gyre Pagella] \definefontfamily[mainface][ss][TeX Gyre Heros] \definefontfamily[mainface][tt][TeX Gyre Cursor] \definefontfamily[mainface][hw][Lucida Casual] \definefontfamily[mainface][cg][Lucida Casual] \setupbodyfont[mainface] \starttext \doloopoverlist{\rm,\ss,\tt,\hw,\cg} {{\recursestring% The quick brown fox jumps over the lazy dog.\par}} \stoptext
Lucida Casual is handwriting and calligraphy in the sample. But you only need one of them.
I hope it helps,
Pablo ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 1/29/23 19:07, Mattias Märka via ntg-context wrote:
Hi
This is probably the most reasonable solution.
Hi Mattias, would you be so kind to update https://wiki.contextgarden.net/Use_the_fonts_you_want to include this? Many thanks for your help, Pablo
![](https://secure.gravatar.com/avatar/1050dd51a9fcfef3b861ddaa5ab5f9a7.jpg?s=120&d=mm&r=g)
Hi
Will do.
\definefontstyle is still bugging me. I gather from previous threads that it should be possible to define a new font style for casual and use that via a font switch, but I cannot get this to work. I'm not sure this is still possible.
The threads I'm referring to:
https://www.mail-archive.com/ntg-context@ntg.nl/msg00039.html
https://www.mail-archive.com/ntg-context@ntg.nl/msg39849.html
https://www.mail-archive.com/ntg-context@ntg.nl/msg84188.html
I might start a separate thread and ask whether \definefontstyle still works.
I also experimented with defining my own typescripts for Lucida so that casual and fax (and all the other various Lucida fonts, really) are easily accessible.
Something like:
\starttypescript[serif][lucbr]
\definefontsynonym[Serif][name:LucidaBright]
\definefontsynonym[SerifItalic][name:LucidaBright-Italic]
\definefontsynonym[SerifBold][name:LucidaBright-Demi]
\definefontsynonym[SerifBoldItalic][name:LucidaBright-DemiItalic]
\definefontsynonym[SerifSlanted][name:LucidaBright-Slanted]
\definefontsynonym[SerifCaps][name:LucidaBrightSmallcaps]
\definefontsynonym[SerifBoldCaps][name:LucidaBrightSmallCaps-Demi]
\stoptypescript
\starttypescript[serif][lucfax]
\definefontsynonym[Serif][name:LucidaFax]
\definefontsynonym[SerifItalic][name:LucidaFax-Italic]
\definefontsynonym[SerifBold][name:LucidaFax-Demi]
\definefontsynonym[SerifBoldItalic][name:LucidaFax-DemiItalic]
\stoptypescript
\starttypescript[sans][lucss]
\definefontsynonym[Sans][name:LucidaSans]
\definefontsynonym[SansItalic][name:LucidaSans-Italic]
\definefontsynonym[SansBold][name:LucidaSans-Demi]
\definefontsynonym[SansBoldItalic][name:LucidaSans-DemiItalic]
\stoptypescript
\starttypescript[mono][lucbr,luctt]
\definefontsynonym[Mono][name:LucidaTypewriter]
\definefontsynonym[MonoItalic][name:LucidaTypweriterOblique]
\definefontsynonym[MonoBold][name:LucidaTypewriterBold]
\definefontsynonym[MonoBoldItalic][name:LucidaTypweriterBoldOblique]
\stoptypescript
\starttypescript[mono][lucss,lucsstt]
\definefontsynonym[Mono][name:LucidaSansTypewriter]
\definefontsynonym[MonoItalic][name:LucidaSansTypweriterOblique]
\definefontsynonym[MonoBold][name:LucidaSansTypewriterBold]
\definefontsynonym[MonoBoldItalic][name:LucidaSansTypweriterBoldOblique]
\stoptypescript
\starttypescript[calligraphy][lucbr,luccg]
\definefontsynonym[Calligraphy][name:LucidaCalligraphy-Italic]
\stoptypescript
\starttypescript[handwriting][lucbr,luchw]
\definefontsynonym[Handwriting][name:LucidaHandwriting-Italic]
\stoptypescript
\starttypescript[serif][lucbl]
\definefontsynonym[Serif][name:LucidaBlackletter]
\stoptypescript
\starttypescript[serif][luccas]
\definefontsynonym[Serif][name:LucidaCasual]
\definefontsynonym[SerifItalic][name:LucidaCasual-Italic]
\stoptypescript
\starttypescript[lucbr]
\definetypeface[lucbr][rm][serif][lucbr][default][features=default]
\definetypeface[lucbr][mm][math][lucida][default]
\definetypeface[lucbr][tt][mono][lucbr][default][features=default]
\definetypeface[lucbr][cg][calligrpahy][default][features=default]
\definetypeface[lucbr][hw][handwriting][default][features=default]
\stoptypescript
\starttypescript[lucfax]
\definetypeface[lucfax][rm][serif][lucfax][default][features=default]
\stoptypescript
\starttypescript[lucss]
\definetypeface[lucss][ss][sans][lucss][default][features=default]
\definetypeface[lucss][tt][mono][lucss][default][features=default]
\stoptypescript
\starttypescript[luctt]
\definetypeface[luctt][tt][mono][luctt][default][features=default]
\stoptypescript
\starttypescript[lucsstt]
\definetypeface[lucsstt][tt][mono][lucsstt][default][features=default]
\stoptypescript
\starttypescript[luccg]
\definetypeface[luccg][cg][calligraphy][luccg][default][features=default]
\stoptypescript
\starttypescript[luchw]
\definetypeface[luchw][hw][handwriting][luchw][default][features=default]
\stoptypescript
\starttypescript[lucbl]
\definetypeface[lucbl][rm][serif][lucbl][default][features=default]
\stoptypescript
\starttypescript[luccas]
\definetypeface[luccas][rm][serif][luccas][default][features=default]
\stoptypescript
\starttypescript[luc]
\definetypeface[luc][rm][serif][lucbr][default][features=default]
\definetypeface[luc][mm][math][lucida][default]
\definetypeface[luc][ss][sans][lucss][default][features=default]
\definetypeface[luc][tt][mono][lucbr][default][features=default]
\definetypeface[luc][cg][calligraphy][lucbr][default][features=default]
\definetypeface[luc][hw][handwriting][lucbr][default][features=default]
\stoptypescript
\def\lucbr{\switchtobodyfont[lucbr]}
\def\lucfax{\switchtobodyfont[lucfax]}
\def\lucss{\switchtobodyfont[lucss]}
\def\luctt{\switchtobodyfont[luctt]}
\def\lucsstt{\switchtobodyfont[lucsstt]}
\def\luccg{\switchtobodyfont[luccg]}
\def\luchw{\switchtobodyfont[luchw]}
\def\lucbl{\switchtobodyfont[lucbl]}
\def\luccas{\switchtobodyfont[luccas]}
Would it make sense adding this to the wiki as well? I feel like what I'm doing is non-standard. I'm also repeating a lot of what's in the Lucida typescript file that comes with the distribution. There must be some easy way to monkey patch the existing type script file.
Mattias
------- Original Message -------
On Monday, January 30th, 2023 at 1:20 PM, Pablo Rodriguez via ntg-context
On 1/29/23 19:07, Mattias Märka via ntg-context wrote:
Hi
This is probably the most reasonable solution.
Hi Mattias,
would you be so kind to update https://wiki.contextgarden.net/Use_the_fonts_you_want to include this?
Many thanks for your help,
Pablo
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/e5aa6984b53b8925e405ebbdbc051ad9.jpg?s=120&d=mm&r=g)
Am 30.01.23 um 18:24 schrieb Mattias Märka via ntg-context:
\definefontstyle is still bugging me. I gather from previous threads that it should be possible to define a new font style for casual and use that via a font switch, but I cannot get this to work. I'm not sure this is still possible.
No, it isn’t, I recently asked Hans. Hraban
![](https://secure.gravatar.com/avatar/1050dd51a9fcfef3b861ddaa5ab5f9a7.jpg?s=120&d=mm&r=g)
Ha, good to know. Do you know what one should do instead?
Also, do you know why this is? It would be good to mention this on the wiki.
Mattias
------- Original Message -------
On Monday, January 30th, 2023 at 7:49 PM, Henning Hraban Ramm via ntg-context
Am 30.01.23 um 18:24 schrieb Mattias Märka via ntg-context:
\definefontstyle is still bugging me. I gather from previous threads that it should be possible to define a new font style for casual and use that via a font switch, but I cannot get this to work. I'm not sure this is still possible.
No, it isn’t, I recently asked Hans.
Hraban
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 1/30/2023 6:49 PM, Henning Hraban Ramm via ntg-context wrote:
Am 30.01.23 um 18:24 schrieb Mattias Märka via ntg-context:
\definefontstyle is still bugging me. I gather from previous threads that it should be possible to define a new font style for casual and use that via a font switch, but I cannot get this to work. I'm not sure this is still possible.
No, it isn’t, I recently asked Hans. just define a new typeface with casual as serif
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (5)
-
Garulfo
-
Hans Hagen
-
Henning Hraban Ramm
-
Mattias Märka
-
Pablo Rodriguez