Remove Language::fontenc()

This raw vector of fontenc alternatives is not needed outside Language,
and it should actually never be used.
This commit is contained in:
Juergen Spitzmueller 2018-04-23 12:59:57 +02:00
parent 998f097686
commit f63de41c4c
3 changed files with 9 additions and 18 deletions

View File

@ -904,15 +904,14 @@ void LaTeXFeatures::getFontEncodings(vector<string> & encs, bool const onlylangs
encs.insert(encs.begin(), "T2A");
}
for (auto const & lang : UsedLanguages_)
if (!lang->fontencs().empty()) {
vector<string> extraencs =
getVectorFromString(lang->fontenc(buffer().masterParams()));
for (auto const & extra : extraencs) {
if (extra != "none" && find(encs.begin(), encs.end(), extra) == encs.end())
encs.insert(encs.begin(), extra);
}
for (auto const & lang : UsedLanguages_) {
vector<string> extraencs =
getVectorFromString(lang->fontenc(buffer().masterParams()));
for (auto const & extra : extraencs) {
if (extra != "none" && find(encs.begin(), encs.end(), extra) == encs.end())
encs.insert(encs.begin(), extra);
}
}
}
namespace {

View File

@ -72,12 +72,6 @@ docstring const Language::translateLayout(string const & m) const
}
vector<string> Language::fontencs() const
{
return fontenc_;
}
string Language::fontenc(BufferParams const & params) const
{
// Determine optimal font encoding
@ -99,7 +93,7 @@ string Language::fontenc(BufferParams const & params) const
}
// We did not find a suitable one; just take the first in the list,
// the priorized one (which is "T1" for ASCII).
return fontencs().front() == "ASCII" ? "T1" : fontencs().front();
return fontenc_.front() == "ASCII" ? "T1" : fontenc_.front();
}

View File

@ -84,10 +84,8 @@ public:
docstring babel_presettings() const { return babel_presettings_; }
/// This language internally sets a font encoding
bool internalFontEncoding() const { return internal_enc_; }
/// fontenc encoding(s)
/// The most suitable font encoding(s) for the selected document font
std::string fontenc(BufferParams const &) const;
/// fontenc encoding(s)
std::vector<std::string> fontencs() const;
/// This language needs to be passed to babel itself (not the class)
bool asBabelOptions() const { return as_babel_options_; }
/// This language corresponds to a translation of the GUI