mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Get rid of LyXRC::font_norm_type, since it is no longer needed for arabic
support. LyXRC::font_norm stays for now, since it is still used for the kbmap stuff. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17566 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
728c361511
commit
925c17c058
@ -1475,7 +1475,6 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
case LFUN_SCREEN_FONT_UPDATE:
|
||||
BOOST_ASSERT(lyx_view_);
|
||||
// handle the screen font changes.
|
||||
lyxrc.set_font_norm_type();
|
||||
theFontLoader().update();
|
||||
/// FIXME: only the current view will be updated. the Gui
|
||||
/// class is able to furnish the list of views.
|
||||
|
22
src/lyxrc.C
22
src/lyxrc.C
@ -238,7 +238,6 @@ void LyXRC::setDefaults() {
|
||||
sans_font_name = "";
|
||||
typewriter_font_name = "";
|
||||
font_norm = "iso8859-1";
|
||||
font_norm_type = ISO_8859_1;
|
||||
autosave = 300;
|
||||
auto_region_delete = true;
|
||||
auto_reset_options = false;
|
||||
@ -800,7 +799,6 @@ int LyXRC::read(LyXLex & lexrc)
|
||||
case RC_SCREEN_FONT_ENCODING:
|
||||
if (lexrc.next()) {
|
||||
font_norm = lexrc.getString();
|
||||
set_font_norm_type();
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2089,26 +2087,6 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const
|
||||
os.flush();
|
||||
}
|
||||
|
||||
void LyXRC::set_font_norm_type()
|
||||
{
|
||||
if (font_norm == "iso10646-1")
|
||||
font_norm_type = ISO_10646_1;
|
||||
else if (font_norm == "iso8859-1")
|
||||
font_norm_type = ISO_8859_1;
|
||||
else if (font_norm == "iso8859-3")
|
||||
font_norm_type = ISO_8859_3;
|
||||
else if (font_norm == "iso8859-4")
|
||||
font_norm_type = ISO_8859_4;
|
||||
else if (font_norm == "iso8859-6.8x")
|
||||
font_norm_type = ISO_8859_6_8;
|
||||
else if (font_norm == "iso8859-9")
|
||||
font_norm_type = ISO_8859_9;
|
||||
else if (font_norm == "iso8859-15")
|
||||
font_norm_type = ISO_8859_15;
|
||||
else
|
||||
font_norm_type = OTHER_ENCODING;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
string const LyXRC::getDescription(LyXRCTags tag)
|
||||
|
23
src/lyxrc.h
23
src/lyxrc.h
@ -275,29 +275,6 @@ public:
|
||||
///
|
||||
std::string font_norm;
|
||||
///
|
||||
enum FontEncoding {
|
||||
///
|
||||
ISO_10646_1,
|
||||
///
|
||||
ISO_8859_1,
|
||||
///
|
||||
ISO_8859_3,
|
||||
///
|
||||
ISO_8859_4,
|
||||
///
|
||||
ISO_8859_6_8,
|
||||
///
|
||||
ISO_8859_9,
|
||||
///
|
||||
ISO_8859_15,
|
||||
///
|
||||
OTHER_ENCODING
|
||||
};
|
||||
///
|
||||
FontEncoding font_norm_type;
|
||||
///
|
||||
void set_font_norm_type();
|
||||
///
|
||||
unsigned int autosave;
|
||||
///
|
||||
std::string plaintext_roff_command;
|
||||
|
@ -1557,11 +1557,7 @@ bool Paragraph::allowEmpty() const
|
||||
char_type Paragraph::transformChar(char_type c, pos_type pos) const
|
||||
{
|
||||
if (!Encodings::is_arabic(c))
|
||||
if (lyxrc.font_norm_type == LyXRC::ISO_8859_6_8 && isDigit(c))
|
||||
// FIXME UNICODE What does this do?
|
||||
return c + (0xb0 - '0');
|
||||
else
|
||||
return c;
|
||||
return c;
|
||||
|
||||
value_type const prev_char = pos > 0 ? getChar(pos - 1) : ' ';
|
||||
value_type next_char = ' ';
|
||||
|
@ -416,9 +416,7 @@ void RowPainter::paintFromPos(pos_type & vpos)
|
||||
// special case languages
|
||||
std::string const & lang = orig_font.language()->lang();
|
||||
bool const hebrew = lang == "hebrew";
|
||||
bool const arabic = lang == "arabic" &&
|
||||
(lyxrc.font_norm_type == LyXRC::ISO_8859_6_8 ||
|
||||
lyxrc.font_norm_type == LyXRC::ISO_10646_1);
|
||||
bool const arabic = lang == "arabic";
|
||||
|
||||
// draw as many chars as we can
|
||||
if ((!hebrew && !arabic)
|
||||
|
@ -367,9 +367,7 @@ int LyXText::singleWidth(Paragraph const & par,
|
||||
if (isPrintable(c)) {
|
||||
Language const * language = font.language();
|
||||
if (language->rightToLeft()) {
|
||||
if ((lyxrc.font_norm_type == LyXRC::ISO_8859_6_8 ||
|
||||
lyxrc.font_norm_type == LyXRC::ISO_10646_1)
|
||||
&& language->lang() == "arabic") {
|
||||
if (language->lang() == "arabic") {
|
||||
if (Encodings::isComposeChar_arabic(c))
|
||||
return 0;
|
||||
c = par.transformChar(c, pos);
|
||||
|
Loading…
Reference in New Issue
Block a user