TeX - LaTeX Asked by mac on January 5, 2021
I use Kerkis Sans
greek font as a secondary font in my documents, for titles, paragraphs etc. As I’ve been testing the font I noticed that the capital greek F (Φ) is much smaller that the rest of the letters. My attempt to resize it was this
documentclass[english,greek]{article}
usepackage[T1]{fontenc}
usepackage{babel}
usepackage{txfontsb,graphicx}
newcommand{kerkissans}[1]{{fontfamily{maksf}selectfont #1}}
begin{document}
ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ
kerkissans{ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ}
kerkissans{textbf{ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ}}
kerkissans{textbf{resizebox{!}{6pt}{Φ}Φ}}
end{document}
The problems I face are
Kerkis Sans
font and only when the text is boldIs there a way to resize the bold Φ
globally?
The bug should be reported to the maintainer of Kerkis.
In the meantime, you can do as follows:
documentclass[english,greek]{article}
usepackage[T1]{fontenc}
usepackage{babel}
usepackage{txfontsb}
usepackage{graphicx}
usepackage{newunicodechar}
usepackage{xparse}
newcommand{kerkissans}[1]{{fontfamily{maksf}selectfont #1}}
newunicodechar{Φ}{FIXEDPHI}
ExplSyntaxOn
NewDocumentCommand{FIXEDPHI}{}
{
str_if_eq:eeTF { use:c { f@family } } { maksf }
{
str_if_in:enTF { use:c { f@series } } { b }
{ resizebox{!}{fontcharhtfont`A}{F} +}
{ F }
}
{ F }
}
prg_generate_conditional_variant:Nnn str_if_in:nn { e } { T, F, TF }
ExplSyntaxOff
begin{document}
ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ
kerkissans{ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ}
kerkissans{textit{ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ}}
kerkissans{textbf{ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ}}
kerkissans{textit{textbf{ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ}}}
end{document}
I added a +
in order to show that the fix is applied only when necessary, that is, when the font series is bold (also bold italic has the bug).
In the production version, remove the +
:
NewDocumentCommand{FIXEDPHI}{}
{
str_if_eq:eeTF { use:c { f@family } } { maksf }
{
str_if_in:enTF { use:c { f@series } } { b }
{ resizebox{!}{fontcharhtfont`A}{F} }
{ F }
}
{ F }
}
+
for debuggingCorrect answer by egreg on January 5, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP