return false;
if (it->second.textpreamble() != "textgreek"
- && it->second.textpreamble() != "textcyrillic")
+ && it->second.textpreamble() != "textcyrillic"
+ && it->second.textpreamble() != "textbaltic")
return false;
- if (preamble.empty()) {
+ if (preamble.empty() && it->second.textpreamble() != "textbaltic") {
preamble = it->second.textpreamble();
return true;
}
if (provides_.find(name) != provides_.end())
return true;
- // FIXME: the "textbaltic" definitions are only needed if the context
- // font encoding of the respective char is not l7x.
- // We cannot check this here as we have no context information.
-
if (params_.useNonTeXFonts)
return params_.documentClass().provides(name);
// non-standard text accents:
if (mustProvide("textcommaabove") || mustProvide("textcommaaboveright") ||
- mustProvide("textcommabelow") || mustProvide("textbaltic"))
+ mustProvide("textcommabelow") || mustProvide("textbalticdefs"))
macros << lyxaccent_def;
- if (mustProvide("textcommabelow") || mustProvide("textbaltic"))
+ if (mustProvide("textcommabelow") || mustProvide("textbalticdefs"))
macros << textcommabelow_def << '\n';
- if (mustProvide("textcommaabove") || mustProvide("textbaltic"))
+ if (mustProvide("textcommaabove") || mustProvide("textbalticdefs"))
macros << textcommaabove_def << '\n';
if (mustProvide("textcommaaboveright"))
macros << textcommaaboveright_def << '\n';
- if (mustProvide("textbaltic"))
+ if (mustProvide("textbalticdefs"))
macros << textbaltic_def << '\n';
// split-level fractions
// then the contents
BufferParams const bp = features.runparams().is_child
? features.buffer().masterParams() : features.buffer().params();
+ string bscript = "textbaltic";
for (pos_type i = 0; i < int(text_.size()) ; ++i) {
char_type c = text_[i];
if (c == 0x0022) {
else if (bp.main_font_encoding() != "T1"
|| ((&owner_->getFontSettings(bp, i))->language()->internalFontEncoding()))
features.require("textquotedbl");
- }
- if (!bp.use_dash_ligatures
- && (c == 0x2013 || c == 0x2014)
- && bp.useNonTeXFonts
- && features.runparams().flavor == OutputParams::XETEX)
+ } else if (Encodings::isKnownScriptChar(c, bscript)){
+ string fontenc = (&owner_->getFontSettings(bp, i))->language()->fontenc();
+ if (fontenc.empty())
+ fontenc = features.runparams().main_fontenc;
+ if (Encodings::needsScriptWrapper("textbaltic", fontenc))
+ features.require("textbalticdefs");
+ } else if (!bp.use_dash_ligatures
+ && (c == 0x2013 || c == 0x2014)
+ && bp.useNonTeXFonts
+ && features.runparams().flavor == OutputParams::XETEX)
// XeTeX's dash behaviour is determined via a global setting
features.require("xetexdashbreakstate");
BufferEncodings::validate(c, features);