mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Increment version to 565 due to add of adobe source pro fonts
This commit is contained in:
parent
2348e0b615
commit
99174acff8
@ -126,7 +126,7 @@ class fontmapping:
|
||||
return fontname
|
||||
return None
|
||||
|
||||
def createFontMapping():
|
||||
def createFontMapping(fontlist):
|
||||
# Create info for known fonts for the use in
|
||||
# convert_latexFonts() and
|
||||
# revert_latexFonts()
|
||||
@ -136,9 +136,12 @@ def createFontMapping():
|
||||
# * For now, add DejaVu and IBMPlex only.
|
||||
# * Expand, if desired
|
||||
fm = fontmapping()
|
||||
for font in fontlist:
|
||||
if font == 'DejaVu':
|
||||
fm.expandFontMapping(['DejaVuSerif', 'DejaVuSerifCondensed'], "roman", None, None)
|
||||
fm.expandFontMapping(['DejaVuSans','DejaVuSansCondensed'], "sans", "sf", None, "scaled")
|
||||
fm.expandFontMapping(['DejaVuSansMono'], "typewriter", "tt", None, "scaled")
|
||||
elif font == 'IBM':
|
||||
fm.expandFontMapping(['IBMPlexSerif', 'IBMPlexSerifThin,thin',
|
||||
'IBMPlexSerifExtraLight,extralight', 'IBMPlexSerifLight,light',
|
||||
'IBMPlexSerifSemibold,semibold'],
|
||||
@ -151,6 +154,7 @@ def createFontMapping():
|
||||
'IBMPlexMonoExtraLight,extralight', 'IBMPlexMonoLight,light',
|
||||
'IBMPlexMonoSemibold,semibold'],
|
||||
"typewriter", "tt", "plex-mono", "scale")
|
||||
elif font == 'Adobe':
|
||||
fm.expandFontMapping(['ADOBESourceSerifPro'], "roman", None, "sourceserifpro")
|
||||
fm.expandFontMapping(['ADOBESourceSansPro'], "sans", "sf", "sourcesanspro", "scaled")
|
||||
fm.expandFontMapping(['ADOBESourceCodePro'], "typewriter", "tt", "sourcecodepro", "scaled")
|
||||
@ -271,7 +275,7 @@ def convert_latexFonts(document):
|
||||
" Handle DejaVu and IBMPlex fonts definition to LaTeX "
|
||||
|
||||
if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1:
|
||||
fm = createFontMapping()
|
||||
fm = createFontMapping(['DejaVu', 'IBM'])
|
||||
convert_fonts(document, fm)
|
||||
|
||||
def revert_latexFonts(document):
|
||||
@ -279,7 +283,23 @@ def revert_latexFonts(document):
|
||||
|
||||
if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1:
|
||||
fontmap = dict()
|
||||
fm = createFontMapping()
|
||||
fm = createFontMapping(['DejaVu', 'IBM'])
|
||||
revert_fonts(document, fm, fontmap)
|
||||
add_preamble_fonts(document, fontmap)
|
||||
|
||||
def convert_AdobeFonts(document):
|
||||
" Handle DejaVu and IBMPlex fonts definition to LaTeX "
|
||||
|
||||
if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1:
|
||||
fm = createFontMapping(['Adobe'])
|
||||
convert_fonts(document, fm)
|
||||
|
||||
def revert_AdobeFonts(document):
|
||||
" Revert native DejaVu font definition to LaTeX "
|
||||
|
||||
if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1:
|
||||
fontmap = dict()
|
||||
fm = createFontMapping(['Adobe'])
|
||||
revert_fonts(document, fm, fontmap)
|
||||
add_preamble_fonts(document, fontmap)
|
||||
|
||||
@ -1386,10 +1406,12 @@ convert = [
|
||||
[561, [convert_latexFonts]], # Handle dejavu, ibmplex fonts in GUI
|
||||
[562, []],
|
||||
[563, []],
|
||||
[564, []]
|
||||
[564, []],
|
||||
[565, [convert_AdobeFonts]], # Handle adobe fonts in GUI
|
||||
]
|
||||
|
||||
revert = [
|
||||
[564, [revert_AdobeFonts]],
|
||||
[563, [revert_lformatinfo]],
|
||||
[562, [revert_listpargs]],
|
||||
[561, [revert_l7ninfo]],
|
||||
|
@ -32,8 +32,8 @@ extern char const * const lyx_version_info;
|
||||
|
||||
// Do not remove the comment below, so we get merge conflict in
|
||||
// independent branches. Instead add your own.
|
||||
#define LYX_FORMAT_LYX 564 // spitz: layoutformat info inset
|
||||
#define LYX_FORMAT_TEX2LYX 564
|
||||
#define LYX_FORMAT_LYX 565 // Kornel: Adobe fonts added
|
||||
#define LYX_FORMAT_TEX2LYX 565
|
||||
|
||||
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
|
||||
#ifndef _MSC_VER
|
||||
|
Loading…
Reference in New Issue
Block a user