* src/Language{.cpp,h}:

- new member internalFontEncoding() that indicates if a language
	  switches the font encoding internally.

* src/Paragraph.cpp (latexSpecialChar):
	- don't call latexSpecialT1 if the internal font encoding isn't T1.

This fixes the output of straight quotation marks in Hebrew and Greek.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@27659 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2008-11-21 14:53:47 +00:00
parent 4b7743d18b
commit 69839e1ae6
4 changed files with 23 additions and 3 deletions

View File

@ -57,6 +57,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)
{

View File

@ -48,6 +48,8 @@ public:
///
std::string const & latex_options() const { return latex_options_; }
///
bool internalFontEncoding() const;
///
bool read(Lexer & lex);
private:
///

View File

@ -864,9 +864,15 @@ void Paragraph::Private::latexSpecialChar(
return;
}
if (lyxrc.fontenc == "T1" && latexSpecialT1(c, os, i, column))
// If T1 font encoding is used, use the special
// characters it provides.
// NOTE: some languages reset the font encoding
// internally
if (!running_font.language()->internalFontEncoding()
&& lyxrc.fontenc == "T1" && latexSpecialT1(c, os, i, column))
return;
// \tt font needs special treatment
if (running_font.fontInfo().family() == TYPEWRITER_FAMILY
&& latexSpecialTypewriter(c, os, i, column))
return;

View File

@ -69,11 +69,11 @@ What's new
- Fix export to latex in the presence of an encoding switch (bug 5489).
- Fix export of straight quotes in Hebrew and Greek context.
* USER INTERFACE
- Fix the -geometry command line option on Windows (bug 5467).
- Fix crash when undoing a math operation while the outline pane was open
(bug 5491).
@ -88,6 +88,8 @@ What's new
- Fix wrong size of the view source window (bug 4430).
- Fix the -geometry command line option on Windows (bug 5467).
- Fix problem with display of footnote numbers, etc., in child documents.
- Fix painting update rules after LFUN_UP or LFUN_DOWN in an inset.