diff --git a/development/FORMAT b/development/FORMAT index 0c3bf536a4..b49994050f 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -7,6 +7,10 @@ changes happened in particular if possible. A good example would be ----------------------- +2019-07-14 Jürgen Spitzmüller + * Format incremented to 581: split osf options to rm, sf, and tt + \font_osf => \font_roman_osf, \font_sans_osf, \font_typewriter_osf + 2019-07-11 Uwe Stöhr Jürgen Spitzmüller * Format incremented to 580: support for document font options diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py index ca55c8ec17..ad045ed0a2 100644 --- a/lib/lyx2lyx/lyx_2_4.py +++ b/lib/lyx2lyx/lyx_2_4.py @@ -2579,7 +2579,6 @@ def revert_notoFonts_xopts(document): def revert_IBMFonts_xopts(document): " Revert native IBM font definition (with extra options) to LaTeX " - i = find_token(document.header, '\\use_non_tex_fonts', 0) if i == -1: document.warning("Malformed LyX document: Missing \\use_non_tex_fonts.") @@ -2611,6 +2610,104 @@ def revert_AdobeFonts_xopts(document): add_preamble_fonts(document, fontmap) +def convert_osf(document): + " Convert \\font_osf param to new format " + + NonTeXFonts = False + i = find_token(document.header, '\\use_non_tex_fonts', 0) + if i == -1: + document.warning("Malformed LyX document: Missing \\use_non_tex_fonts.") + else: + NonTeXFonts = str2bool(get_value(document.header, "\\use_non_tex_fonts", i)) + + i = find_token(document.header, '\\font_osf', 0) + if i == -1: + document.warning("Malformed LyX document: Missing \\font_osf.") + return + + osfsf = ["biolinum", "ADOBESourceSansPro", "NotoSansRegular", "NotoSansMedium", "NotoSansThin", "NotoSansLight", "NotoSansExtralight" ] + osftt = ["ADOBESourceCodePro", "NotoMonoRegular" ] + + osfval = str2bool(get_value(document.header, "\\font_osf", i)) + document.header[i] = document.header[i].replace("\\font_osf", "\\font_roman_osf") + + if NonTeXFonts: + document.header.insert(i, "\\font_sans_osf false") + document.header.insert(i + 1, "\\font_typewriter_osf false") + return + + if osfval: + x = find_token(document.header, "\\font_sans", 0) + if x == -1: + document.warning("Malformed LyX document: Missing \\font_sans.") + else: + # We need to use this regex since split() does not handle quote protection + sffont = re.findall(r'[^"\s]\S*|".+?"', document.header[x]) + sf = sffont[1].strip('"') + if sf in osfsf: + document.header.insert(i, "\\font_sans_osf true") + else: + document.header.insert(i, "\\font_sans_osf false") + + x = find_token(document.header, "\\font_typewriter", 0) + if x == -1: + document.warning("Malformed LyX document: Missing \\font_typewriter.") + else: + # We need to use this regex since split() does not handle quote protection + ttfont = re.findall(r'[^"\s]\S*|".+?"', document.header[x]) + tt = ttfont[1].strip('"') + if tt in osftt: + document.header.insert(i + 1, "\\font_sans_osf true") + else: + document.header.insert(i + 1, "\\font_sans_osf false") + + else: + document.header.insert(i, "\\font_sans_osf false") + document.header.insert(i + 1, "\\font_typewriter_osf false") + + +def revert_osf(document): + " Revert \\font_*_osf params " + + NonTeXFonts = False + i = find_token(document.header, '\\use_non_tex_fonts', 0) + if i == -1: + document.warning("Malformed LyX document: Missing \\use_non_tex_fonts.") + else: + NonTeXFonts = str2bool(get_value(document.header, "\\use_non_tex_fonts", i)) + + i = find_token(document.header, '\\font_roman_osf', 0) + if i == -1: + document.warning("Malformed LyX document: Missing \\font_roman_osf.") + return + + osfval = str2bool(get_value(document.header, "\\font_roman_osf", i)) + document.header[i] = document.header[i].replace("\\font_roman_osf", "\\font_osf") + + i = find_token(document.header, '\\font_sans_osf', 0) + if i == -1: + document.warning("Malformed LyX document: Missing \\font_sans_osf.") + return + + osfval = str2bool(get_value(document.header, "\\font_sans_osf", i)) + del document.header[i] + + i = find_token(document.header, '\\font_typewriter_osf', 0) + if i == -1: + document.warning("Malformed LyX document: Missing \\font_typewriter_osf.") + return + + osfval |= str2bool(get_value(document.header, "\\font_typewriter_osf", i)) + del document.header[i] + + if osfval: + i = find_token(document.header, '\\font_osf', 0) + if i == -1: + document.warning("Malformed LyX document: Missing \\font_osf.") + return + document.header[i] = "\\font_osf true" + + ## # Conversion hub # @@ -2652,10 +2749,12 @@ convert = [ [577, [convert_linggloss]], [578, []], [579, []], - [580, []] + [580, []], + [581, [convert_osf]] ] -revert = [[579, [revert_minionpro, revert_plainNotoFonts_xopts, revert_notoFonts_xopts, revert_IBMFonts_xopts, revert_AdobeFonts_xopts, revert_font_opts]], # keep revert_font_opts last! +revert = [[580, [revert_osf]], + [579, [revert_minionpro, revert_plainNotoFonts_xopts, revert_notoFonts_xopts, revert_IBMFonts_xopts, revert_AdobeFonts_xopts, revert_font_opts]], # keep revert_font_opts last! [578, [revert_babelfont]], [577, [revert_drs]], [576, [revert_linggloss, revert_subexarg]], diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 426bf8c042..e1a279f3e1 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -419,7 +419,9 @@ BufferParams::BufferParams() use_microtype = false; use_dash_ligatures = true; fonts_expert_sc = false; - fonts_old_figures = false; + fonts_roman_osf = false; + fonts_sans_osf = false; + fonts_typewriter_osf = false; fonts_sans_scale[0] = 100; fonts_sans_scale[1] = 100; fonts_typewriter_scale[0] = 100; @@ -832,8 +834,12 @@ string BufferParams::readToken(Lexer & lex, string const & token, lex >> useNonTeXFonts; } else if (token == "\\font_sc") { lex >> fonts_expert_sc; - } else if (token == "\\font_osf") { - lex >> fonts_old_figures; + } else if (token == "\\font_roman_osf") { + lex >> fonts_roman_osf; + } else if (token == "\\font_sans_osf") { + lex >> fonts_sans_osf; + } else if (token == "\\font_typewriter_osf") { + lex >> fonts_typewriter_osf; } else if (token == "\\font_roman_opts") { lex >> font_roman_opts; } else if (token == "\\font_sf_scale") { @@ -1257,7 +1263,9 @@ void BufferParams::writeFile(ostream & os, Buffer const * buf) const << "\n\\font_default_family " << fonts_default_family << "\n\\use_non_tex_fonts " << convert(useNonTeXFonts) << "\n\\font_sc " << convert(fonts_expert_sc) - << "\n\\font_osf " << convert(fonts_old_figures); + << "\n\\font_roman_osf " << convert(fonts_roman_osf) + << "\n\\font_sans_osf " << convert(fonts_sans_osf) + << "\n\\font_typewriter_osf " << convert(fonts_typewriter_osf); if (!font_roman_opts.empty()) os << "\n\\font_roman_opts \"" << font_roman_opts << "\""; os << "\n\\font_sf_scale " << fonts_sans_scale[0] @@ -3406,7 +3414,7 @@ string const BufferParams::loadFonts(LaTeXFeatures & features) const if (!font_roman_opts.empty()) os << font_roman_opts << ','; os << texmapping; - if (fonts_old_figures) + if (fonts_roman_osf) os << ",Numbers=OldStyle"; os << "]{" << parseFontName(fontsRoman()) << "}\n"; } @@ -3419,6 +3427,8 @@ string const BufferParams::loadFonts(LaTeXFeatures & features) const os << "\\setsansfont"; os << "[Scale=" << float(fontsSansScale()) / 100 << ','; + if (fonts_sans_osf) + os << "Numbers=OldStyle,"; if (!font_sans_opts.empty()) os << font_sans_opts << ','; os << texmapping << "]{" @@ -3428,6 +3438,8 @@ string const BufferParams::loadFonts(LaTeXFeatures & features) const os << "\\babelfont{sf}["; else os << "\\setsansfont["; + if (fonts_sans_osf) + os << "Numbers=OldStyle,"; if (!font_sans_opts.empty()) os << font_sans_opts << ','; os << texmapping << "]{" @@ -3443,6 +3455,8 @@ string const BufferParams::loadFonts(LaTeXFeatures & features) const os << "\\setmonofont"; os << "[Scale=" << float(fontsTypewriterScale()) / 100; + if (fonts_typewriter_osf) + os << ",Numbers=OldStyle"; if (!font_typewriter_opts.empty()) os << ',' << font_typewriter_opts; os << "]{" @@ -3452,8 +3466,17 @@ string const BufferParams::loadFonts(LaTeXFeatures & features) const os << "\\babelfont{tt}"; else os << "\\setmonofont"; - if (!font_typewriter_opts.empty()) - os << '[' << font_typewriter_opts << ']'; + if (!font_typewriter_opts.empty() || fonts_typewriter_osf) { + os << '['; + if (fonts_typewriter_osf) + os << "Numbers=OldStyle"; + if (!font_typewriter_opts.empty()) { + if (fonts_typewriter_osf) + os << ','; + os << font_typewriter_opts; + } + os << ']'; + } os << '{' << mono << "}\n"; } } @@ -3468,22 +3491,22 @@ string const BufferParams::loadFonts(LaTeXFeatures & features) const // ROMAN FONTS os << theLaTeXFonts().getLaTeXFont(from_ascii(fontsRoman())).getLaTeXCode( - dryrun, ot1, complete, fonts_expert_sc, fonts_old_figures, + dryrun, ot1, complete, fonts_expert_sc, fonts_roman_osf, nomath, font_roman_opts); // SANS SERIF os << theLaTeXFonts().getLaTeXFont(from_ascii(fontsSans())).getLaTeXCode( - dryrun, ot1, complete, fonts_expert_sc, fonts_old_figures, + dryrun, ot1, complete, fonts_expert_sc, fonts_sans_osf, nomath, font_sans_opts, fontsSansScale()); // MONOSPACED/TYPEWRITER os << theLaTeXFonts().getLaTeXFont(from_ascii(fontsTypewriter())).getLaTeXCode( - dryrun, ot1, complete, fonts_expert_sc, fonts_old_figures, + dryrun, ot1, complete, fonts_expert_sc, fonts_typewriter_osf, nomath, font_typewriter_opts, fontsTypewriterScale()); // MATH os << theLaTeXFonts().getLaTeXFont(from_ascii(fontsMath())).getLaTeXCode( - dryrun, ot1, complete, fonts_expert_sc, fonts_old_figures, + dryrun, ot1, complete, fonts_expert_sc, fonts_roman_osf, nomath); return os.str(); diff --git a/src/BufferParams.h b/src/BufferParams.h index 84c91ef880..cf3c26696f 100644 --- a/src/BufferParams.h +++ b/src/BufferParams.h @@ -283,8 +283,12 @@ public: bool useNonTeXFonts; /// use expert Small Caps bool fonts_expert_sc; - /// use Old Style Figures - bool fonts_old_figures; + /// use Old Style Figures (rm) + bool fonts_roman_osf; + /// use Old Style Figures (sf) + bool fonts_sans_osf; + /// use Old Style Figures (tt) + bool fonts_typewriter_osf; /// the options for the roman font std::string font_roman_opts; /// the scale factor of the sf font: [0] for TeX fonts, [1] for non-TeX fonts diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index c40736cfe7..cceb5b1c00 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -1090,6 +1090,10 @@ GuiDocument::GuiDocument(GuiView & lv) this, SLOT(change_adaptor())); connect(fontModule->fontOsfCB, SIGNAL(toggled(bool)), this, SLOT(fontOsfToggled(bool))); + connect(fontModule->fontSansOsfCB, SIGNAL(clicked()), + this, SLOT(change_adaptor())); + connect(fontModule->fontTypewriterOsfCB, SIGNAL(clicked()), + this, SLOT(change_adaptor())); connect(fontModule->fontspecRomanLE, SIGNAL(textChanged(const QString &)), this, SLOT(change_adaptor())); connect(fontModule->fontspecSansLE, SIGNAL(textChanged(const QString &)), @@ -2462,12 +2466,14 @@ void GuiDocument::updateFontOptions() bool scaleable = providesScale(font); fontModule->scaleSansSB->setEnabled(scaleable); fontModule->scaleSansLA->setEnabled(scaleable); + fontModule->fontSansOsfCB->setEnabled(providesOSF(font)); if (tex_fonts) font = fontModule->fontsTypewriterCO->itemData( fontModule->fontsTypewriterCO->currentIndex()).toString(); scaleable = providesScale(font); fontModule->scaleTypewriterSB->setEnabled(scaleable); fontModule->scaleTypewriterLA->setEnabled(scaleable); + fontModule->fontTypewriterOsfCB->setEnabled(providesOSF(font)); if (tex_fonts) font = fontModule->fontsRomanCO->itemData( fontModule->fontsRomanCO->currentIndex()).toString(); @@ -2667,6 +2673,7 @@ void GuiDocument::sansChanged(int item) bool const scaleable = providesScale(font); fontModule->scaleSansSB->setEnabled(scaleable); fontModule->scaleSansLA->setEnabled(scaleable); + fontModule->fontSansOsfCB->setEnabled(providesOSF(font)); updateExtraOpts(); } @@ -2680,6 +2687,7 @@ void GuiDocument::ttChanged(int item) bool scaleable = providesScale(font); fontModule->scaleTypewriterSB->setEnabled(scaleable); fontModule->scaleTypewriterLA->setEnabled(scaleable); + fontModule->fontTypewriterOsfCB->setEnabled(providesOSF(font)); updateExtraOpts(); } @@ -3711,7 +3719,9 @@ void GuiDocument::applyView() bp_.fonts_expert_sc = fontModule->fontScCB->isChecked(); - bp_.fonts_old_figures = fontModule->fontOsfCB->isChecked(); + bp_.fonts_roman_osf = fontModule->fontOsfCB->isChecked(); + bp_.fonts_sans_osf = fontModule->fontSansOsfCB->isChecked(); + bp_.fonts_typewriter_osf = fontModule->fontTypewriterOsfCB->isChecked(); if (nontexfonts) bp_.fonts_default_family = "default"; @@ -4227,7 +4237,9 @@ void GuiDocument::paramsToDialog() fontModule->dashesCB->setChecked(!bp_.use_dash_ligatures); fontModule->fontScCB->setChecked(bp_.fonts_expert_sc); - fontModule->fontOsfCB->setChecked(bp_.fonts_old_figures); + fontModule->fontOsfCB->setChecked(bp_.fonts_roman_osf); + fontModule->fontSansOsfCB->setChecked(bp_.fonts_sans_osf); + fontModule->fontTypewriterOsfCB->setChecked(bp_.fonts_typewriter_osf); fontModule->scaleSansSB->setValue(bp_.fontsSansScale()); fontModule->font_sf_scale = bp_.fonts_sans_scale[!bp_.useNonTeXFonts]; fontModule->scaleTypewriterSB->setValue(bp_.fontsTypewriterScale()); @@ -4931,6 +4943,7 @@ bool GuiDocument::providesOSF(QString const & font) const // FIXME: we should check if the fonts really // have OSF support. But how? return true; + LYXERR0("osf font: " << font); return theLaTeXFonts().getLaTeXFont( qstring_to_ucs4(font)).providesOSF(ot1(), completeFontset(), diff --git a/src/frontends/qt4/ui/FontUi.ui b/src/frontends/qt4/ui/FontUi.ui index c31627feda..d2858b0063 100644 --- a/src/frontends/qt4/ui/FontUi.ui +++ b/src/frontends/qt4/ui/FontUi.ui @@ -6,26 +6,29 @@ 0 0 - 534 - 632 + 568 + 557 FontUi - - - - - Use OpenType and TrueType fonts with the fontspec package (requires XeTeX or LuaTeX) + + + + + Qt::Vertical - - &Use non-TeX fonts (via XeTeX/LuaTeX) + + + 20 + 126 + - + - - + + @@ -112,33 +115,90 @@ - - - Select the roman (serif) typeface - - - - - + - - - Options: - - - fontspecRomanLE + + + Select the roman (serif) typeface - + + + Qt::Horizontal + + + + 40 + 20 + + + + + + - Here you can insert additional options (as provided by the font package) + Use a real small caps shape, if the font provides one + + + Use true s&mall caps + + + + + + Use old style instead of lining figures + + + Use &old style figures + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + + + Options: + + + fontspecRomanLE + + + + + + + Here you can insert additional options (as provided by the font package) + + + + + + + @@ -197,23 +257,53 @@ - + - - - Options: + + + Use old style instead of lining figures - - fontspecSansLE + + Use old st&yle figures - - - Here you can insert additional options (as provided by the font package) + + + Qt::Horizontal - + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + + + Options: + + + fontspecSansLE + + + + + + + Here you can insert additional options (as provided by the font package) + + + + @@ -275,23 +365,53 @@ - + - - - Options: + + + Use old style instead of lining figures - - fontspecTypewriterLE + + Use old style &figures - - - Here you can insert additional options (as provided by the font package) + + + Qt::Horizontal - + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + + + Options: + + + fontspecTypewriterLE + + + + + + + Here you can insert additional options (as provided by the font package) + + + + @@ -329,60 +449,37 @@ - - - - Use a real small caps shape, if the font provides one - - - Use true s&mall caps - - - - - - - Use old style instead of lining figures - - - Use &old style figures - - - - - - - Activate extensions such as character protrusion and font expansion via the microtype package - - - Enable micr&o-typographic extensions - - - - - - - By default, a line break can occur after en- and em-dashes. Checking this box prevents that. - - - Disallow l&ine breaks after dashes - - - - - - - Qt::Vertical + + + + Activate extensions such as character protrusion and font expansion via the microtype package - - - 20 - 126 - + + Enable micr&o-typographic extensions - + + + + + + Use OpenType and TrueType fonts with the fontspec package (requires XeTeX or LuaTeX) + + + &Use non-TeX fonts (via XeTeX/LuaTeX) + + + + + + + By default, a line break can occur after en- and em-dashes. Checking this box prevents that. + + + Disallow l&ine breaks after dashes + + @@ -399,8 +496,6 @@ fontsTypewriterCO scaleTypewriterSB cjkFontLE - fontScCB - fontOsfCB qt_i18n.h diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp index 3dc53c9638..c6d2c6dfd1 100644 --- a/src/tex2lyx/Preamble.cpp +++ b/src/tex2lyx/Preamble.cpp @@ -529,7 +529,9 @@ Preamble::Preamble() : one_language(true), explicit_babel(false), h_font_default_family = "default"; h_use_non_tex_fonts = false; h_font_sc = "false"; - h_font_osf = "false"; + h_font_roman_osf = "false"; + h_font_sans_osf = "false"; + h_font_typewriter_osf = "false"; h_font_sf_scale[0] = "100"; h_font_sf_scale[1] = "100"; h_font_tt_scale[0] = "100"; @@ -757,7 +759,7 @@ void Preamble::handle_package(Parser &p, string const & name, if (name == "garamondx") { h_font_roman[0] = "garamondx"; if (opts == "osfI") - h_font_osf = "true"; + h_font_roman_osf = "true"; } if (name == "libertine") { @@ -767,9 +769,9 @@ void Preamble::handle_package(Parser &p, string const & name, // as well as libertineMono h_font_typewriter[0] = "libertine-mono"; if (opts == "osf") - h_font_osf = "true"; + h_font_roman_osf = "true"; else if (opts == "lining") - h_font_osf = "false"; + h_font_roman_osf = "false"; } if (name == "libertineRoman" || name == "libertine-type1") { @@ -778,20 +780,20 @@ void Preamble::handle_package(Parser &p, string const & name, // and libertine-type1 do not automatically invoke // biolinum and libertineMono if (opts == "lining") - h_font_osf = "false"; + h_font_roman_osf = "false"; else if (opts == "osf") - h_font_osf = "true"; + h_font_roman_osf = "true"; } if (name == "MinionPro") { h_font_roman[0] = "minionpro"; vector allopts = getVectorFromString(opts); string xopts; - h_font_osf = "true"; + h_font_roman_osf = "true"; h_font_math[0] = "auto"; for (auto const & opt : allopts) { if (opt == "lf") { - h_font_osf = "false"; + h_font_roman_osf = "false"; continue; } if (opt == "onlytext") { @@ -816,7 +818,7 @@ void Preamble::handle_package(Parser &p, string const & name, h_font_roman[0] = "md-utopia"; if (opts.find("expert") != string::npos) { h_font_sc = "true"; - h_font_osf = "true"; + h_font_roman_osf = "true"; } } @@ -834,7 +836,7 @@ void Preamble::handle_package(Parser &p, string const & name, // cochineal can have several options, e.g. [proportional,osf] string::size_type pos = opts.find("osf"); if (pos != string::npos) - h_font_osf = "true"; + h_font_roman_osf = "true"; } if (name == "noto") { @@ -864,7 +866,7 @@ void Preamble::handle_package(Parser &p, string const & name, if (opt == "nott") continue; if (opt == "osf") { - h_font_osf = "true"; + h_font_roman_osf = "true"; continue; } if (!xopts.empty()) @@ -886,7 +888,7 @@ void Preamble::handle_package(Parser &p, string const & name, if (name == "XCharter") { h_font_roman[0] = "xcharter"; if (opts == "osf") - h_font_osf = "true"; + h_font_roman_osf = "true"; } if (name == "plex-serif") { @@ -959,7 +961,7 @@ void Preamble::handle_package(Parser &p, string const & name, string xopts; for (auto const & opt : allopts) { if (opt == "osf") { - h_font_osf = "true"; + h_font_roman_osf = "true"; continue; } if (!xopts.empty()) @@ -985,7 +987,7 @@ void Preamble::handle_package(Parser &p, string const & name, // biolinum can have several options, e.g. [osf,scaled=0.97] string::size_type pos = opts.find("osf"); if (pos != string::npos) - h_font_osf = "true"; + h_font_sans_osf = "true"; } if (name == "PTSans") { @@ -1057,6 +1059,10 @@ void Preamble::handle_package(Parser &p, string const & name, continue; if (opt == "semibold") continue; + if (opt == "osf") { + h_font_sans_osf = "true"; + continue; + } if (!xopts.empty()) xopts += ", "; xopts += opt; @@ -1076,7 +1082,7 @@ void Preamble::handle_package(Parser &p, string const & name, continue; } if (opt == "osf") { - h_font_osf = "true"; + h_font_sans_osf = "true"; continue; } if (!xopts.empty()) @@ -1173,7 +1179,7 @@ void Preamble::handle_package(Parser &p, string const & name, continue; } if (opt == "osf") { - h_font_osf = "true"; + h_font_typewriter_osf = "true"; continue; } if (!xopts.empty()) @@ -1187,7 +1193,7 @@ void Preamble::handle_package(Parser &p, string const & name, // font uses old-style figure if (name == "eco") - h_font_osf = "true"; + h_font_roman_osf = "true"; // math fonts if (is_known(name, known_math_font_packages)) @@ -1614,7 +1620,9 @@ bool Preamble::writeLyXHeader(ostream & os, bool subdoc, string const & outfiled << "\\font_default_family " << h_font_default_family << "\n" << "\\use_non_tex_fonts " << (h_use_non_tex_fonts ? "true" : "false") << '\n' << "\\font_sc " << h_font_sc << "\n" - << "\\font_osf " << h_font_osf << "\n"; + << "\\font_roman_osf " << h_font_roman_osf << "\n" + << "\\font_sans_osf " << h_font_sans_osf << "\n" + << "\\font_typewriter_osf " << h_font_typewriter_osf << "\n"; if (!h_font_roman_opts.empty()) os << "\\font_roman_opts \"" << h_font_roman_opts << "\"" << '\n'; os << "\\font_sf_scale " << h_font_sf_scale[0] diff --git a/src/tex2lyx/Preamble.h b/src/tex2lyx/Preamble.h index 0ec2b4581f..6a29c45497 100644 --- a/src/tex2lyx/Preamble.h +++ b/src/tex2lyx/Preamble.h @@ -172,7 +172,9 @@ private: std::string h_font_default_family; bool h_use_non_tex_fonts; std::string h_font_sc; - std::string h_font_osf; + std::string h_font_roman_osf; + std::string h_font_sans_osf; + std::string h_font_typewriter_osf; std::string h_font_sf_scale[2]; std::string h_font_tt_scale[2]; bool h_font_cjk_set; diff --git a/src/version.h b/src/version.h index 0d53cde07d..e42b7a8ed7 100644 --- a/src/version.h +++ b/src/version.h @@ -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 580 // spitz/uwestoehr: support for fontspec options -#define LYX_FORMAT_TEX2LYX 580 +#define LYX_FORMAT_LYX 581 // spitz: split osf to font families +#define LYX_FORMAT_TEX2LYX 581 #if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX #ifndef _MSC_VER