commit 66a33930f5989f638750bdd0d6973be044e19492
Author: Kornel Benko <[email protected]>
Date: Sat Aug 18 17:10:43 2018 +0200
Amend 24050bf, DejaVu adm IBM-Plex fonts need different scale options
---
lib/lyx2lyx/lyx_2_4.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py
index b68c220..f2f1fe1 100644
--- a/lib/lyx2lyx/lyx_2_4.py
+++ b/lib/lyx2lyx/lyx_2_4.py
@@ -60,7 +60,7 @@ def convert_fonts(document, font_list, font_type, scale_type,
pkg):
" Handle font definition to LaTeX "
def createkey(pkg, options):
- sort(options)
+ options.sort()
return pkg + ':' + "-".join(options)
def getfontname(pkg, options, pkg2fontmap, font2pkgmap):
@@ -200,7 +200,12 @@ def revert_fonts(document, font_list, fontmap,
package=None):
# cutoff " 100"
xval = xval[:-4]
if xval != "100":
- fontmap[val].extend(["scale=" + format(float(xval) /
100, '.2f')])
+ # set correct scale option
+ if re.match('Deja.*', val):
+ scale_par = "scaled"
+ else:
+ scale_par = "scale"
+ fontmap[val].extend([scale_par + "=" +
format(float(xval) / 100, '.2f')])
if len(optmap[font]) > 0:
fontmap[val].extend(optmap[font])