mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Added latex-DejaVu fonts to lyx-GUI.
Increment lyx-format to 561
This commit is contained in:
parent
136b8a63be
commit
366e37c851
@ -7,6 +7,9 @@ changes happened in particular if possible. A good example would be
|
|||||||
|
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
|
2018-08-10 Kornel Benko <kornel@lyx.org>
|
||||||
|
* format incremented to 561: Added DejaVu fonts
|
||||||
|
|
||||||
2018-08-07 Jürgen Spitzmüller <spitz@lyx.org>
|
2018-08-07 Jürgen Spitzmüller <spitz@lyx.org>
|
||||||
* format incremented to 560: Time-related info insets: time, modtime, fixtime;
|
* format incremented to 560: Time-related info insets: time, modtime, fixtime;
|
||||||
new buffer info inset type: name-noext.
|
new buffer info inset type: name-noext.
|
||||||
|
@ -445,6 +445,11 @@
|
|||||||
\TestFont[eorm10]{ecc} % required by ccfonts
|
\TestFont[eorm10]{ecc} % required by ccfonts
|
||||||
\TestPackage[ot1ccr.fd]{concmath} % required by ccfonts
|
\TestPackage[ot1ccr.fd]{concmath} % required by ccfonts
|
||||||
\TestPackage{cmbright}
|
\TestPackage{cmbright}
|
||||||
|
\TestPackage{DejaVuSans}
|
||||||
|
\TestPackage{DejaVuSansCondensed}
|
||||||
|
\TestPackage{DejaVuSansMono}
|
||||||
|
\TestPackage{DejaVuSerif}
|
||||||
|
\TestPackage{DejaVuSerifCondensed}
|
||||||
\TestPackage{eco}
|
\TestPackage{eco}
|
||||||
\TestPackage{eulervm}
|
\TestPackage{eulervm}
|
||||||
\TestPackage{feyn}
|
\TestPackage{feyn}
|
||||||
|
@ -148,6 +148,18 @@ Font cmr
|
|||||||
OsfFont eco
|
OsfFont eco
|
||||||
EndFont
|
EndFont
|
||||||
|
|
||||||
|
Font DejaVuSerif
|
||||||
|
GuiName "DejaVu Serif"
|
||||||
|
Family rm
|
||||||
|
Package DejaVuSerif
|
||||||
|
EndFont
|
||||||
|
|
||||||
|
Font DejaVuSerifCondensed
|
||||||
|
GuiName "DejaVu Serif Condensed"
|
||||||
|
Family rm
|
||||||
|
Package DejaVuSerifCondensed
|
||||||
|
EndFont
|
||||||
|
|
||||||
AltFont eco
|
AltFont eco
|
||||||
Family rm
|
Family rm
|
||||||
Package eco
|
Package eco
|
||||||
@ -528,6 +540,20 @@ Font cmss
|
|||||||
SwitchDefault 1
|
SwitchDefault 1
|
||||||
EndFont
|
EndFont
|
||||||
|
|
||||||
|
Font DejaVuSans
|
||||||
|
GuiName "DejaVu Sans"
|
||||||
|
Family sf
|
||||||
|
Package DejaVuSans
|
||||||
|
ScaleOption scaled=$$val
|
||||||
|
EndFont
|
||||||
|
|
||||||
|
Font DejaVuSansCondensed
|
||||||
|
GuiName "DejaVu Sans Condensed"
|
||||||
|
Family sf
|
||||||
|
Package DejaVuSansCondensed
|
||||||
|
ScaleOption scaled=$$val
|
||||||
|
EndFont
|
||||||
|
|
||||||
Font helvet
|
Font helvet
|
||||||
GuiName "Helvetica"
|
GuiName "Helvetica"
|
||||||
Family sf
|
Family sf
|
||||||
@ -633,7 +659,6 @@ Font uop
|
|||||||
Requires urwclassico
|
Requires urwclassico
|
||||||
EndFont
|
EndFont
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# MONOSPACED FONTS
|
# MONOSPACED FONTS
|
||||||
#
|
#
|
||||||
@ -667,6 +692,13 @@ Font courier
|
|||||||
Requires psnfss
|
Requires psnfss
|
||||||
EndFont
|
EndFont
|
||||||
|
|
||||||
|
Font DejaVuSansMono
|
||||||
|
GuiName "DejaVu Sans Mono"
|
||||||
|
Family tt
|
||||||
|
Package DejaVuSansMono
|
||||||
|
ScaleOption scaled=$$val
|
||||||
|
EndFont
|
||||||
|
|
||||||
Font libertine-mono
|
Font libertine-mono
|
||||||
GuiName "Libertine Mono"
|
GuiName "Libertine Mono"
|
||||||
Family tt
|
Family tt
|
||||||
|
@ -51,6 +51,33 @@ from lyx2lyx_tools import (put_cmd_in_ert, add_to_preamble)
|
|||||||
###
|
###
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
def revert_dejavu(document):
|
||||||
|
" Revert native DejaVu font definition to LaTeX "
|
||||||
|
|
||||||
|
if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1:
|
||||||
|
dejavu_fonts = ['DejaVuSerif', 'DejaVuSerifCondensed', 'DejaVuSans',
|
||||||
|
'DejaVuSansMono', 'DejaVuSansCondensed']
|
||||||
|
font_types = ["\\font_roman", "\\font_sans,sf", "\\font_typewriter,tt"]
|
||||||
|
for ft1 in font_types:
|
||||||
|
fts = ft1.split(",")
|
||||||
|
ft = fts[0]
|
||||||
|
i = find_token(document.header, ft, 0)
|
||||||
|
if i != -1:
|
||||||
|
val = get_value(document.header, ft, i)
|
||||||
|
words = val.split()
|
||||||
|
val = words[0].replace('"', '')
|
||||||
|
if val in dejavu_fonts:
|
||||||
|
xoption = ""
|
||||||
|
document.header[i] = ft + ' "default" ' + words[1]
|
||||||
|
if len(fts) > 1:
|
||||||
|
xval = get_value(document.header, "\\font_" + fts[1] + "_scale", 0)
|
||||||
|
# cutoff " 100"
|
||||||
|
xval = xval[:-4]
|
||||||
|
if xval != "100":
|
||||||
|
xoption = "[scaled=" + format(float(xval) / 100, '.2f') + "]"
|
||||||
|
preamble = "\\usepackage" + xoption + "{%s}" % val
|
||||||
|
add_to_preamble(document, [preamble])
|
||||||
|
|
||||||
def removeFrontMatterStyles(document):
|
def removeFrontMatterStyles(document):
|
||||||
" Remove styles Begin/EndFromatter"
|
" Remove styles Begin/EndFromatter"
|
||||||
|
|
||||||
@ -1071,10 +1098,12 @@ convert = [
|
|||||||
[557, [convert_vcsinfo]],
|
[557, [convert_vcsinfo]],
|
||||||
[558, [removeFrontMatterStyles]],
|
[558, [removeFrontMatterStyles]],
|
||||||
[559, []],
|
[559, []],
|
||||||
[560, []]
|
[560, []],
|
||||||
|
[561, []]
|
||||||
]
|
]
|
||||||
|
|
||||||
revert = [
|
revert = [
|
||||||
|
[560, [revert_dejavu]],
|
||||||
[559, [revert_timeinfo, revert_namenoextinfo]],
|
[559, [revert_timeinfo, revert_namenoextinfo]],
|
||||||
[558, [revert_dateinfo]],
|
[558, [revert_dateinfo]],
|
||||||
[557, [addFrontMatterStyles]],
|
[557, [addFrontMatterStyles]],
|
||||||
|
@ -141,18 +141,18 @@ const char * const known_old_language_packages[] = {"french", "frenchle",
|
|||||||
char const * const known_fontsizes[] = { "10pt", "11pt", "12pt", 0 };
|
char const * const known_fontsizes[] = { "10pt", "11pt", "12pt", 0 };
|
||||||
|
|
||||||
const char * const known_roman_fonts[] = { "ae", "beraserif", "bookman",
|
const char * const known_roman_fonts[] = { "ae", "beraserif", "bookman",
|
||||||
"ccfonts", "chancery", "charter", "cmr", "cochineal", "crimson", "fourier",
|
"ccfonts", "chancery", "charter", "cmr", "cochineal", "crimson", "DejaVuSerif", "DejaVuSerifCondensed", "fourier",
|
||||||
"garamondx", "libertine", "libertineRoman", "libertine-type1", "lmodern", "mathdesign", "mathpazo",
|
"garamondx", "libertine", "libertineRoman", "libertine-type1", "lmodern", "mathdesign", "mathpazo",
|
||||||
"mathptmx", "MinionPro", "newcent", "NotoSerif-TLF", "PTSerif-TLF", "tgbonum", "tgchorus",
|
"mathptmx", "MinionPro", "newcent", "NotoSerif-TLF", "PTSerif-TLF", "tgbonum", "tgchorus",
|
||||||
"tgpagella", "tgschola", "tgtermes", "utopia", "xcharter", 0 };
|
"tgpagella", "tgschola", "tgtermes", "utopia", "xcharter", 0 };
|
||||||
|
|
||||||
const char * const known_sans_fonts[] = { "avant", "berasans", "biolinum",
|
const char * const known_sans_fonts[] = { "avant", "berasans", "biolinum",
|
||||||
"biolinum-type1", "cmbr", "cmss", "helvet", "iwona", "iwonac", "iwonal", "iwonalc",
|
"biolinum-type1", "cmbr", "cmss", "DejaVuSans", "DejaVuSansCondensed", "helvet", "iwona", "iwonac", "iwonal", "iwonalc",
|
||||||
"kurier", "kurierc", "kurierl", "kurierlc", "lmss", "NotoSans-TLF", "PTSans-TLF",
|
"kurier", "kurierc", "kurierl", "kurierlc", "lmss", "NotoSans-TLF", "PTSans-TLF",
|
||||||
"tgadventor", "tgheros", "uop", 0 };
|
"tgadventor", "tgheros", "uop", 0 };
|
||||||
|
|
||||||
const char * const known_typewriter_fonts[] = { "beramono", "cmtl", "cmtt",
|
const char * const known_typewriter_fonts[] = { "beramono", "cmtl", "cmtt",
|
||||||
"courier", "lmtt", "luximono", "fourier", "libertineMono", "libertineMono-type1", "lmodern",
|
"courier", "DejaVuSansMono", "lmtt", "luximono", "fourier", "libertineMono", "libertineMono-type1", "lmodern",
|
||||||
"mathpazo", "mathptmx", "newcent", "NotoMono-TLF", "PTMono-TLF", "tgcursor", "txtt", 0 };
|
"mathpazo", "mathptmx", "newcent", "NotoMono-TLF", "PTMono-TLF", "tgcursor", "txtt", 0 };
|
||||||
|
|
||||||
const char * const known_math_fonts[] = { "eulervm", "newtxmath", 0};
|
const char * const known_math_fonts[] = { "eulervm", "newtxmath", 0};
|
||||||
|
@ -63,6 +63,7 @@ Format LaTeX feature LyX feature
|
|||||||
556 Bib files encoding
|
556 Bib files encoding
|
||||||
\begin_inset CommandInset bibtex Biblatex: bibencoding=<encoding> [latex name]
|
\begin_inset CommandInset bibtex Biblatex: bibencoding=<encoding> [latex name]
|
||||||
encoding=<encoding> [lyx name] BibTeX: \bgroup\inputencoding{<encoding>}...\egroup
|
encoding=<encoding> [lyx name] BibTeX: \bgroup\inputencoding{<encoding>}...\egroup
|
||||||
|
561 DejaVu fonts for latex \font_(roman|sans|typewriter) setting
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,8 +32,8 @@ extern char const * const lyx_version_info;
|
|||||||
|
|
||||||
// Do not remove the comment below, so we get merge conflict in
|
// Do not remove the comment below, so we get merge conflict in
|
||||||
// independent branches. Instead add your own.
|
// independent branches. Instead add your own.
|
||||||
#define LYX_FORMAT_LYX 560 // spitz: time info insets
|
#define LYX_FORMAT_LYX 561 // kornel: Added dejavu fonts
|
||||||
#define LYX_FORMAT_TEX2LYX 560
|
#define LYX_FORMAT_TEX2LYX 561
|
||||||
|
|
||||||
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
|
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
|
Loading…
Reference in New Issue
Block a user