mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
rename BufferParams::font_encoding() to ::main_font_encoding()
Because that's what's actually returned.
This commit is contained in:
parent
83cf59cf94
commit
73ccee113e
@ -1646,7 +1646,7 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features,
|
||||
|
||||
// if we use fontspec or newtxmath, we have to load the AMS packages here
|
||||
string const ams = features.loadAMSPackages();
|
||||
bool const ot1 = (font_encoding() == "default" || font_encoding() == "OT1");
|
||||
bool const ot1 = (main_font_encoding() == "default" || main_font_encoding() == "OT1");
|
||||
bool const use_newtxmath =
|
||||
theLaTeXFonts().getLaTeXFont(from_ascii(fontsMath())).getUsedPackage(
|
||||
ot1, false, false) == "newtxmath";
|
||||
@ -1673,7 +1673,7 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features,
|
||||
// set font encoding
|
||||
// XeTeX and LuaTeX (with OS fonts) do not need fontenc
|
||||
if (!useNonTeXFonts && !features.isProvided("fontenc")
|
||||
&& font_encoding() != "default") {
|
||||
&& main_font_encoding() != "default") {
|
||||
// get main font encodings
|
||||
vector<string> fontencs = font_encodings();
|
||||
// get font encodings of secondary languages
|
||||
@ -2992,7 +2992,7 @@ string const BufferParams::dvips_options() const
|
||||
}
|
||||
|
||||
|
||||
string const BufferParams::font_encoding() const
|
||||
string const BufferParams::main_font_encoding() const
|
||||
{
|
||||
return font_encodings().empty() ? "default" : font_encodings().back();
|
||||
}
|
||||
@ -3228,7 +3228,7 @@ string const BufferParams::loadFonts(LaTeXFeatures & features) const
|
||||
}
|
||||
|
||||
// Tex Fonts
|
||||
bool const ot1 = (font_encoding() == "default" || font_encoding() == "OT1");
|
||||
bool const ot1 = (main_font_encoding() == "default" || main_font_encoding() == "OT1");
|
||||
bool const dryrun = features.runparams().dryrun;
|
||||
bool const complete = (fontsSans() == "default" && fontsTypewriter() == "default");
|
||||
bool const nomath = (fontsMath() == "default");
|
||||
|
@ -411,7 +411,7 @@ public:
|
||||
AuthorMap author_map_;
|
||||
|
||||
/// the buffer's active font encoding
|
||||
std::string const font_encoding() const;
|
||||
std::string const main_font_encoding() const;
|
||||
/// all font encodings requested by the prefs/document/main language.
|
||||
/// This does NOT include font encodings required by secondary languages
|
||||
std::vector<std::string> const font_encodings() const;
|
||||
|
@ -591,8 +591,8 @@ bool LaTeXFeatures::isProvided(string const & name) const
|
||||
if (params_.useNonTeXFonts)
|
||||
return params_.documentClass().provides(name);
|
||||
|
||||
bool const ot1 = (params_.font_encoding() == "default"
|
||||
|| params_.font_encoding() == "OT1");
|
||||
bool const ot1 = (params_.main_font_encoding() == "default"
|
||||
|| params_.main_font_encoding() == "OT1");
|
||||
bool const complete = (params_.fontsSans() == "default"
|
||||
&& params_.fontsTypewriter() == "default");
|
||||
bool const nomath = (params_.fontsMath() == "default");
|
||||
@ -1089,7 +1089,8 @@ string const LaTeXFeatures::getPackages() const
|
||||
// if fontspec or newtxmath is used, AMS packages have to be loaded
|
||||
// before fontspec (in BufferParams)
|
||||
string const amsPackages = loadAMSPackages();
|
||||
bool const ot1 = (params_.font_encoding() == "default" || params_.font_encoding() == "OT1");
|
||||
bool const ot1 = (params_.main_font_encoding() == "default"
|
||||
|| params_.main_font_encoding() == "OT1");
|
||||
bool const use_newtxmath =
|
||||
theLaTeXFonts().getLaTeXFont(from_ascii(params_.fontsMath())).getUsedPackage(
|
||||
ot1, false, false) == "newtxmath";
|
||||
@ -1318,14 +1319,14 @@ TexString LaTeXFeatures::getMacros() const
|
||||
|
||||
if (!usePolyglossia() && mustProvide("textgreek")) {
|
||||
// ensure LGR font encoding is defined also if fontenc is not loaded by LyX
|
||||
if (params_.font_encoding() == "default")
|
||||
if (params_.main_font_encoding() == "default")
|
||||
macros << textgreek_LGR_def;
|
||||
macros << textgreek_def << '\n';
|
||||
}
|
||||
|
||||
if (!usePolyglossia() && mustProvide("textcyr")) {
|
||||
// ensure T2A font encoding is set up also if fontenc is not loaded by LyX
|
||||
if (params_.font_encoding() == "default")
|
||||
if (params_.main_font_encoding() == "default")
|
||||
macros << textcyr_T2A_def;
|
||||
macros << textcyr_def << '\n';
|
||||
}
|
||||
|
@ -1194,7 +1194,7 @@ void Paragraph::Private::latexSpecialChar(otexstream & os,
|
||||
// non-standard font encoding. If we are using such a language,
|
||||
// we do not output special T1 chars.
|
||||
if (!runparams.inIPA && !running_font.language()->internalFontEncoding()
|
||||
&& !runparams.isFullUnicode() && bparams.font_encoding() == "T1"
|
||||
&& !runparams.isFullUnicode() && bparams.main_font_encoding() == "T1"
|
||||
&& latexSpecialT1(c, os, i, column))
|
||||
return;
|
||||
// NOTE: XeTeX and LuaTeX use EU1/2 (pre 2017) or TU (as of 2017) encoding
|
||||
|
@ -628,7 +628,7 @@ InsetQuotes::InsetQuotes(Buffer * buf, char_type c, InsetQuotesParams::QuoteLeve
|
||||
bool dynamic = false;
|
||||
if (buf) {
|
||||
global_style_ = buf->masterBuffer()->params().quotes_style;
|
||||
fontenc_ = buf->masterBuffer()->params().font_encoding();
|
||||
fontenc_ = buf->masterBuffer()->params().main_font_encoding();
|
||||
dynamic = buf->masterBuffer()->params().dynamic_quotes;
|
||||
fontspec_ = buf->masterBuffer()->params().useNonTeXFonts;
|
||||
} else {
|
||||
@ -979,7 +979,7 @@ void InsetQuotes::updateBuffer(ParIterator const & it, UpdateType /* utype*/)
|
||||
BufferParams const & bp = buffer().masterBuffer()->params();
|
||||
pass_thru_ = it.paragraph().isPassThru();
|
||||
context_lang_ = it.paragraph().getFontSettings(bp, it.pos()).language()->code();
|
||||
fontenc_ = bp.font_encoding();
|
||||
fontenc_ = bp.main_font_encoding();
|
||||
global_style_ = bp.quotes_style;
|
||||
fontspec_ = bp.useNonTeXFonts;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user