mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Amend a25b9702
, lyx2lyx: Corrected handling of system-font-specs
In the lines specifying the font, e.g. \font_typewriter "DejaVuSansMono" "DejaVu Sans Mono" the system font specs may contain words separated by spaces
This commit is contained in:
parent
7e1c5ae44b
commit
c2091becd2
@ -220,7 +220,8 @@ def convert_fonts(document, fm):
|
|||||||
if j != -1:
|
if j != -1:
|
||||||
val = get_value(document.header, ft, j)
|
val = get_value(document.header, ft, j)
|
||||||
vals = val.split()
|
vals = val.split()
|
||||||
document.header[j] = ft + ' "' + fn + '" ' + vals[1]
|
vals[0] = '"' + fn + '"'
|
||||||
|
document.header[j] = ft + ' ' + ' '.join(vals)
|
||||||
|
|
||||||
def revert_fonts(document, fm, fontmap):
|
def revert_fonts(document, fm, fontmap):
|
||||||
" Revert native font definition to LaTeX "
|
" Revert native font definition to LaTeX "
|
||||||
@ -251,7 +252,8 @@ def revert_fonts(document, fm, fontmap):
|
|||||||
val = fontinfo.package
|
val = fontinfo.package
|
||||||
if not val in fontmap:
|
if not val in fontmap:
|
||||||
fontmap[val] = []
|
fontmap[val] = []
|
||||||
document.header[i] = ft + ' "default" ' + words[1]
|
words[0] = '"default"'
|
||||||
|
document.header[i] = ft + ' ' + ' '.join(words)
|
||||||
if fontinfo.scaleopt != None:
|
if fontinfo.scaleopt != None:
|
||||||
xval = get_value(document.header, "\\font_" + fontinfo.scaletype + "_scale", 0)
|
xval = get_value(document.header, "\\font_" + fontinfo.scaletype + "_scale", 0)
|
||||||
mo = rscales.search(xval)
|
mo = rscales.search(xval)
|
||||||
|
Loading…
Reference in New Issue
Block a user