-
I would like to combine two fonts as described in the luaotfload manual (p. 23), i.e. use a base font and replace some glyphs by those of a second font.
Could this be achieved using OpTeX? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
I replaced
Where is a problem? |
Beta Was this translation helpful? Give feedback.
-
I'd like to use such a combined font within the OpTeX font selection system. For example selecting font family Baskerville the lowercase glyphs a-z of the regular font should be taken from e.g. Times regular font (doesn't make sense, just for example).
22.10.2024 18:40:39 Petr Olšák ***@***.***>:
…
I replaced *\input luaotfload.sty* by *\initunifonts* in your example (because this OpTeX macro initializes luaotfload) and the code can be processed by OpTeX:
*\def \feats {-tlig;-liga;mode=base;-kern}
\def \fileone {EBGaramond-Italic.otf}
\def \filetwo {FreeMonoBoldOblique.otf}
\def \filethree {SourceSansPro-ExtraLight.otf}
\initunifonts
\font \one = file:\fileone :\feats
\font \two = file:\filetwo :\feats
\font \three = file:\filethree :\feats
\font \onetwothree = "combo: 1 -> \fontid \one ;
2 -> \fontid \two , 0x30-0x39;
3 -> \fontid \three , 0x21*0x3f; "
{\onetwothree \TeX —0123456789—?!}
\bye
*
Where is a problem?
—
Reply to this email directly, view it on GitHub[#196 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AGDGIAFAEYU2V4WJDV4WANLZ4Z5YNAVCNFSM6AAAAABQM3FHZGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMBRHE3TEMI].
You are receiving this because you authored the thread.
[Verfolgungsbild][https://github.com/notifications/beacon/AGDGIAGUIR53W3KW7AN7ZSTZ4Z5YNA5CNFSM6AAAAABQM3FHZGWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAVAS4S.gif]
|
Beta Was this translation helpful? Give feedback.
-
OK. Next example combines letters from Pagella-Italic and Heros-Bold. Moreover, the macro
|
Beta Was this translation helpful? Give feedback.
-
Many thanks! OpTeX is great.
22.10.2024 20:10:46 Petr Olšák ***@***.***>:
…
OK. Next example combines letters from Termes-Italic and Pagella-Regular. Moreover, the macro *\combofont* respects the current size of fonts given by the OpTeX font selection system.
*\fontfam[Heros]
\fontfam[Pagella]
\fontdef\one{\Pagella\it} % Pagella-Italic
\fontdef\two{\Heros\bf} % Heros-Bold
\def\combofont{%
\fontlet\one=\one \_sizespec \fontlet\two=\two \_sizespec % resize \one and \two to the current font size
\font \combospec = "combo: 1 -> \fontid \one ; 2 -> \fontid \two , 0x30-0x39;"
\combospec
}
\combofont Text 012345.
\medskip
\setfontsize{at14pt}\combofont Larger text 12345.
\bye
*
—
Reply to this email directly, view it on GitHub[#196 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AGDGIAF36PVGDESAJKSMKMLZ42IKLAVCNFSM6AAAAABQM3FHZGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMBSGA2TCOA].
You are receiving this because you authored the thread.
[Verfolgungsbild][https://github.com/notifications/beacon/AGDGIAEIZWLD64TD5IURCRTZ42IKLA5CNFSM6AAAAABQM3FHZGWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAVAUOM.gif]
|
Beta Was this translation helpful? Give feedback.
OK. Next example combines letters from Pagella-Italic and Heros-Bold. Moreover, the macro
\combofont
respects the current size of fonts given by the OpTeX font selection system.