X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLanguage.cpp;h=1ff2cf71892a8e010177c0c33b757495c5be6559;hb=77713af55868140483a1a7f5704dd93b97dbe116;hp=6035aef3a388202e9c0946cd687d5fd163763454;hpb=f1cba8ff64b369792fd49f5ddf90e8126ab476ac;p=lyx.git diff --git a/src/Language.cpp b/src/Language.cpp index 6035aef3a3..1ff2cf7189 100644 --- a/src/Language.cpp +++ b/src/Language.cpp @@ -20,6 +20,7 @@ #include "support/debug.h" #include "support/FileName.h" +#include "support/lstrings.h" using namespace std; using namespace lyx::support; @@ -44,11 +45,13 @@ bool Language::read(Lexer & lex) lex >> display_; lex >> rightToLeft_; lex >> encodingStr_; - lex >> code_; + lex >> codeStr_; lex >> latex_options_; if (!lex) return false; + variety_ = split(codeStr_, code_, '-'); + encoding_ = encodings.fromLyXName(encodingStr_); if (!encoding_ && !encodingStr_.empty()) { encoding_ = encodings.fromLyXName("iso8859-1"); @@ -57,6 +60,16 @@ bool Language::read(Lexer & lex) return true; } +bool Language::internalFontEncoding() const +{ + // FIXME: list incomplete + // FIXME: instead of hardcoding, this + // should go to the languages file + return lang_ == "hebrew" + || lang_ == "greek" + || lang_ == "polutonikogreek"; +} + void Languages::read(FileName const & filename) {