mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Add support for xcharter font.
File format change. Patch by Yuriy Skalko.
This commit is contained in:
parent
c74e399981
commit
6a0f0d28a5
@ -7,6 +7,9 @@ changes happened in particular if possible. A good example would be
|
||||
|
||||
-----------------------
|
||||
|
||||
2018-03-14 Yuriy Skalko <yuriy.skalko@gmail.com>
|
||||
* Format incremented to 547: support for Charter font from XCharter package.
|
||||
|
||||
2018-03-10 Uwe Stöhr <uwestoehr@web.de>
|
||||
* Format incremented to 546: support for ParaType fonts.
|
||||
- \usepackage{PTSerif} > \font_roman "PTSerif-TLF"
|
||||
|
@ -480,6 +480,7 @@
|
||||
\TestPackage{tipx}
|
||||
\TestPackage{tone}
|
||||
\TestPackage{txfonts}% For the txtt monospaced font
|
||||
\TestPackage{XCharter}
|
||||
% symbol packages supported by LyX for items and the special character dialog
|
||||
% see the unicodesymbols file
|
||||
\TestPackage{ascii}
|
||||
|
@ -460,6 +460,12 @@ AltFont futj
|
||||
SwitchDefault 1
|
||||
EndFont
|
||||
|
||||
Font xcharter
|
||||
GuiName "Bitstream Charter (XCharter)"
|
||||
Family rm
|
||||
Package XCharter
|
||||
OsfOption osf
|
||||
EndFont
|
||||
|
||||
#
|
||||
# SANS SERIF FONTS
|
||||
|
@ -126,6 +126,17 @@ def revert_paratype(document):
|
||||
else:
|
||||
add_to_preamble(document, ["\\usepackage{PTMono}"])
|
||||
|
||||
|
||||
def revert_xcharter(document):
|
||||
" Revert XCharter font definitions to LaTeX "
|
||||
|
||||
if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1:
|
||||
preamble = ""
|
||||
i1 = find_token(document.header, "\\font_roman \"xcharter\"", 0)
|
||||
if i1 != -1:
|
||||
add_to_preamble(document, ["\\usepackage{XCharter}"])
|
||||
|
||||
|
||||
##
|
||||
# Conversion hub
|
||||
#
|
||||
@ -133,10 +144,12 @@ def revert_paratype(document):
|
||||
supported_versions = ["2.4.0", "2.4"]
|
||||
convert = [
|
||||
[545, [convert_lst_literalparam]],
|
||||
[546, []]
|
||||
[546, []],
|
||||
[547, []]
|
||||
]
|
||||
|
||||
revert = [
|
||||
[546, [revert_xcharter]],
|
||||
[545, [revert_paratype]],
|
||||
[544, [revert_lst_literalparam]]
|
||||
]
|
||||
|
@ -144,7 +144,7 @@ const char * const known_roman_fonts[] = { "ae", "beraserif", "bookman",
|
||||
"ccfonts", "chancery", "charter", "cmr", "cochineal", "crimson", "fourier",
|
||||
"garamondx", "libertine", "libertineRoman", "libertine-type1", "lmodern", "mathdesign", "mathpazo",
|
||||
"mathptmx", "MinionPro", "newcent", "NotoSerif-TLF", "PTSerif-TLF", "tgbonum", "tgchorus",
|
||||
"tgpagella", "tgschola", "tgtermes", "utopia", 0 };
|
||||
"tgpagella", "tgschola", "tgtermes", "utopia", "xcharter", 0 };
|
||||
|
||||
const char * const known_sans_fonts[] = { "avant", "berasans", "biolinum",
|
||||
"biolinum-type1", "cmbr", "cmss", "helvet", "iwona", "iwonac", "iwonal", "iwonalc",
|
||||
@ -840,6 +840,12 @@ void Preamble::handle_package(Parser &p, string const & name,
|
||||
if (name == "PTSerif")
|
||||
h_font_roman[0] = "PTSerif-TLF";
|
||||
|
||||
if (name == "XCharter") {
|
||||
h_font_roman[0] = "xcharter";
|
||||
if (opts == "osf")
|
||||
h_font_osf = "true";
|
||||
}
|
||||
|
||||
// sansserif fonts
|
||||
if (is_known(name, known_sans_fonts)) {
|
||||
h_font_sans[0] = name;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX file created by tex2lyx 2.4
|
||||
\lyxformat 546
|
||||
\lyxformat 547
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX file created by tex2lyx 2.4
|
||||
\lyxformat 546
|
||||
\lyxformat 547
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX file created by tex2lyx 2.4
|
||||
\lyxformat 546
|
||||
\lyxformat 547
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX file created by tex2lyx 2.4
|
||||
\lyxformat 546
|
||||
\lyxformat 547
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX file created by tex2lyx 2.4
|
||||
\lyxformat 546
|
||||
\lyxformat 547
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX file created by tex2lyx 2.4
|
||||
\lyxformat 546
|
||||
\lyxformat 547
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX file created by tex2lyx 2.4
|
||||
\lyxformat 546
|
||||
\lyxformat 547
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX file created by tex2lyx 2.4
|
||||
\lyxformat 546
|
||||
\lyxformat 547
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX file created by tex2lyx 2.4
|
||||
\lyxformat 546
|
||||
\lyxformat 547
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX file created by tex2lyx 2.4
|
||||
\lyxformat 546
|
||||
\lyxformat 547
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX file created by tex2lyx 2.4
|
||||
\lyxformat 546
|
||||
\lyxformat 547
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX file created by tex2lyx 2.4
|
||||
\lyxformat 546
|
||||
\lyxformat 547
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX file created by tex2lyx 2.4
|
||||
\lyxformat 546
|
||||
\lyxformat 547
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX file created by tex2lyx 2.4
|
||||
\lyxformat 546
|
||||
\lyxformat 547
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX file created by tex2lyx 2.4
|
||||
\lyxformat 546
|
||||
\lyxformat 547
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX file created by tex2lyx 2.4
|
||||
\lyxformat 546
|
||||
\lyxformat 547
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX file created by tex2lyx 2.4
|
||||
\lyxformat 546
|
||||
\lyxformat 547
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
|
@ -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 546 // uwestoehr: support for ParaType fonts
|
||||
#define LYX_FORMAT_TEX2LYX 546
|
||||
#define LYX_FORMAT_LYX 547 // Yuriy Skalko: support for XCharter font
|
||||
#define LYX_FORMAT_TEX2LYX 547
|
||||
|
||||
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
|
||||
#ifndef _MSC_VER
|
||||
|
Loading…
Reference in New Issue
Block a user