MoreOptions 1
EndFont
-Font ADOBESourceSansPro
- GuiName "Adobe Source Sans Pro"
- Family sf
- Package sourcesanspro
- ScaleOption scaled=$$val
+Font ADOBESourceSansPro
+ GuiName "Adobe Source Sans Pro"
+ Family sf
+ Package sourcesanspro
+ ScaleOption scaled=$$val
+ OsfOption osf
MoreOptions 1
EndFont
MoreOptions 1
EndFont
-Font ADOBESourceCodePro
- GuiName "Adobe Source Code Pro"
- Family tt
- Package sourcecodepro
- ScaleOption scaled=$$val
+Font ADOBESourceCodePro
+ GuiName "Adobe Source Code Pro"
+ Family tt
+ Package sourcecodepro
+ ScaleOption scaled=$$val
+ OsfOption osf
MoreOptions 1
EndFont
"typewriter", "tt", "plex-mono", "scale")
elif font == 'Adobe':
fm.expandFontMapping(['ADOBESourceSerifPro'], "roman", None, "sourceserifpro", None, "osf")
- fm.expandFontMapping(['ADOBESourceSansPro'], "sans", "sf", "sourcesanspro", "scaled")
- fm.expandFontMapping(['ADOBESourceCodePro'], "typewriter", "tt", "sourcecodepro", "scaled")
+ fm.expandFontMapping(['ADOBESourceSansPro'], "sans", "sf", "sourcesanspro", "scaled", "osf")
+ fm.expandFontMapping(['ADOBESourceCodePro'], "typewriter", "tt", "sourcecodepro", "scaled", "osf")
elif font == 'Noto':
fm.expandFontMapping(['NotoSerifRegular,regular', 'NotoSerifMedium,medium',
'NotoSerifThin,thin', 'NotoSerifLight,light',
if xval1 != "100":
# set correct scale option
fontmap[val].extend([fontinfo.scaleopt + "=" + format(float(xval1) / 100, '.2f')])
- if fontinfo.osfopt != None and fontinfo.fonttype == "roman":
+ if fontinfo.osfopt != None:
osf = find_token(document.header, "\\font_osf true")
if osf != -1:
- document.header[osf] = "\\font_osf false"
fontmap[val].extend([fontinfo.osfopt])
if len(fontinfo.options) > 0:
fontmap[val].extend(fontinfo.options)