mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
More osf (texfont) fixes
This commit is contained in:
parent
e69a6661a5
commit
509551cae0
@ -726,6 +726,7 @@ Font ADOBESourceSansPro
|
|||||||
Family sf
|
Family sf
|
||||||
Package sourcesanspro
|
Package sourcesanspro
|
||||||
ScaleOption scaled=$$val
|
ScaleOption scaled=$$val
|
||||||
|
OsfOption osf
|
||||||
MoreOptions 1
|
MoreOptions 1
|
||||||
EndFont
|
EndFont
|
||||||
|
|
||||||
@ -989,6 +990,7 @@ Font ADOBESourceCodePro
|
|||||||
Family tt
|
Family tt
|
||||||
Package sourcecodepro
|
Package sourcecodepro
|
||||||
ScaleOption scaled=$$val
|
ScaleOption scaled=$$val
|
||||||
|
OsfOption osf
|
||||||
MoreOptions 1
|
MoreOptions 1
|
||||||
EndFont
|
EndFont
|
||||||
|
|
||||||
|
@ -161,8 +161,8 @@ def createFontMapping(fontlist):
|
|||||||
"typewriter", "tt", "plex-mono", "scale")
|
"typewriter", "tt", "plex-mono", "scale")
|
||||||
elif font == 'Adobe':
|
elif font == 'Adobe':
|
||||||
fm.expandFontMapping(['ADOBESourceSerifPro'], "roman", None, "sourceserifpro", None, "osf")
|
fm.expandFontMapping(['ADOBESourceSerifPro'], "roman", None, "sourceserifpro", None, "osf")
|
||||||
fm.expandFontMapping(['ADOBESourceSansPro'], "sans", "sf", "sourcesanspro", "scaled")
|
fm.expandFontMapping(['ADOBESourceSansPro'], "sans", "sf", "sourcesanspro", "scaled", "osf")
|
||||||
fm.expandFontMapping(['ADOBESourceCodePro'], "typewriter", "tt", "sourcecodepro", "scaled")
|
fm.expandFontMapping(['ADOBESourceCodePro'], "typewriter", "tt", "sourcecodepro", "scaled", "osf")
|
||||||
elif font == 'Noto':
|
elif font == 'Noto':
|
||||||
fm.expandFontMapping(['NotoSerifRegular,regular', 'NotoSerifMedium,medium',
|
fm.expandFontMapping(['NotoSerifRegular,regular', 'NotoSerifMedium,medium',
|
||||||
'NotoSerifThin,thin', 'NotoSerifLight,light',
|
'NotoSerifThin,thin', 'NotoSerifLight,light',
|
||||||
@ -305,10 +305,9 @@ def revert_fonts(document, fm, fontmap, OnlyWithXOpts = False):
|
|||||||
if xval1 != "100":
|
if xval1 != "100":
|
||||||
# set correct scale option
|
# set correct scale option
|
||||||
fontmap[val].extend([fontinfo.scaleopt + "=" + format(float(xval1) / 100, '.2f')])
|
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")
|
osf = find_token(document.header, "\\font_osf true")
|
||||||
if osf != -1:
|
if osf != -1:
|
||||||
document.header[osf] = "\\font_osf false"
|
|
||||||
fontmap[val].extend([fontinfo.osfopt])
|
fontmap[val].extend([fontinfo.osfopt])
|
||||||
if len(fontinfo.options) > 0:
|
if len(fontinfo.options) > 0:
|
||||||
fontmap[val].extend(fontinfo.options)
|
fontmap[val].extend(fontinfo.options)
|
||||||
|
@ -1075,6 +1075,10 @@ void Preamble::handle_package(Parser &p, string const & name,
|
|||||||
scale_as_percentage(opt, h_font_sf_scale[0]);
|
scale_as_percentage(opt, h_font_sf_scale[0]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (opt == "osf") {
|
||||||
|
h_font_osf = "true";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!xopts.empty())
|
if (!xopts.empty())
|
||||||
xopts += ", ";
|
xopts += ", ";
|
||||||
xopts += opt;
|
xopts += opt;
|
||||||
@ -1168,6 +1172,10 @@ void Preamble::handle_package(Parser &p, string const & name,
|
|||||||
scale_as_percentage(opt, h_font_tt_scale[0]);
|
scale_as_percentage(opt, h_font_tt_scale[0]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (opt == "osf") {
|
||||||
|
h_font_osf = "true";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!xopts.empty())
|
if (!xopts.empty())
|
||||||
xopts += ", ";
|
xopts += ", ";
|
||||||
xopts += opt;
|
xopts += opt;
|
||||||
|
Loading…
Reference in New Issue
Block a user