From f08f5821ec5d29232bccb342a5b1ff86600b0716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20St=C3=B6hr?= Date: Tue, 19 Mar 2013 00:57:37 +0100 Subject: [PATCH] support for the Iwona fonts - the support for Iwona is exactly the same as for the Kurier fonts - fileformat change --- development/FORMAT | 5 +++++ lib/chkconfig.ltx | 1 + lib/latexfonts | 41 ++++++++++++++++++++++++++++++++++++++++ lib/lyx2lyx/lyx_2_1.py | 26 ++++++++++++++++++++++++- src/tex2lyx/Preamble.cpp | 3 ++- src/version.h | 4 ++-- 6 files changed, 76 insertions(+), 4 deletions(-) diff --git a/development/FORMAT b/development/FORMAT index 79a23228f1..9d4c8c1c10 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -11,6 +11,11 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx. ----------------------- +2013-08-19 Uwe Stöhr + * Format incremented to 467: support for iwona fonts + new supported sansserif fonts "iwona", "iwonal", "iwonac" + and "iwonalc" and the math font "iwona-math" + 2013-03-17 Jürgen Spitzmüller * Format incremented to 466: Powerdot updates. - Support for item arguments ([...], <...>) diff --git a/lib/chkconfig.ltx b/lib/chkconfig.ltx index c51026b00b..a6b660b1e3 100644 --- a/lib/chkconfig.ltx +++ b/lib/chkconfig.ltx @@ -413,6 +413,7 @@ \TestPackage{fourier} \TestPackage{garamondx} \TestFont[zgmr8r]{garamondx-fonts} +\TestPackage{iwona} \TestPackage{kurier} \TestPackage{lh-lcy} \TestPackage{libertine} diff --git a/lib/latexfonts b/lib/latexfonts index a89c93ee2a..446e83a563 100644 --- a/lib/latexfonts +++ b/lib/latexfonts @@ -460,6 +460,34 @@ Font helvet Requires psnfss EndFont +Font iwona + GuiName "Iwona" + Family sf + Requires iwona + SwitchDefault 1 +EndFont + +Font iwonal + GuiName "Iwona (Light)" + Family sf + Requires iwona + SwitchDefault 1 +EndFont + +Font iwonac + GuiName "Iwona (Condensed)" + Family sf + Requires iwona + SwitchDefault 1 +EndFont + +Font iwonalc + GuiName "Iwona (Light Condensed)" + Family sf + Requires iwona + SwitchDefault 1 +EndFont + Font kurier GuiName "Kurier" Family sf @@ -600,6 +628,19 @@ Font garamondx-ntxm Provides amssymb,amsfonts EndFont +Font iwona-math + GuiName "Iwona (Math)" + Family math + Requires iwona + Preamble + % store roman font + \let\origrmdefault\rmdefault + \usepackage[math]{iwona} + % reset stored roman font + \renewcommand{\rmdefault}{\origrmdefault} + EndPreamble +EndFont + Font kurier-math GuiName "Kurier (Math)" Family math diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py index 771748e093..f42af73c81 100644 --- a/lib/lyx2lyx/lyx_2_1.py +++ b/lib/lyx2lyx/lyx_2_1.py @@ -3630,6 +3630,28 @@ def revert_kurier_fonts(document): add_to_preamble(document, "\\renewcommand{\\sfdefault}{%s}" % sf) document.header[k] = "\\font_sans default" +def revert_iwona_fonts(document): + " Revert iwona font definition to LaTeX " + + i = find_token(document.header, "\\font_math", 0) + if i != -1: + if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1: + val = get_value(document.header, "\\font_math", i) + if val == "iwona-math": + add_to_preamble(document, "\\let\\Myrmdefault\\rmdefault\n" \ + "\\usepackage[math]{iwona}\n" \ + "\\renewcommand{\\rmdefault}{\\Myrmdefault}") + document.header[i] = "\\font_math auto" + + if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1: + iwona_fonts = ["iwona", "iwonac", "iwonal", "iwonalc"] + k = find_token(document.header, "\\font_sans iwona", 0) + if k != -1: + sf = get_value(document.header, "\\font_sans", k) + if sf in iwona_fonts: + add_to_preamble(document, "\\renewcommand{\\sfdefault}{%s}" % sf) + document.header[k] = "\\font_sans default" + def revert_new_libertines(document): " Revert new libertine font definition to LaTeX " @@ -4087,10 +4109,12 @@ convert = [ [463, [convert_encodings]], [464, [convert_use_cancel]], [465, [convert_lyxframes, remove_endframes]], - [466, []] + [466, []], + [467, []] ] revert = [ + [466, [revert_iwona_fonts]], [465, [revert_powerdot_flexes, revert_powerdot_pause, revert_powerdot_itemargs, revert_powerdot_columns]], [464, []], [463, [revert_use_cancel]], diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp index dbf4d5cfe9..6c84f06634 100644 --- a/src/tex2lyx/Preamble.cpp +++ b/src/tex2lyx/Preamble.cpp @@ -129,7 +129,8 @@ const char * const known_roman_fonts[] = { "ae", "beraserif", "bookman", "tgbonum", "tgchorus", "tgpagella", "tgschola", "tgtermes", "utopia", 0}; const char * const known_sans_fonts[] = { "avant", "berasans", "biolinum-type1", -"cmbr", "cmss", "helvet", "kurier", "kurierl", "lmss", "tgadventor", "tgheros", 0}; +"cmbr", "cmss", "helvet", "iwona", "iwonal", "kurier", "kurierl", "lmss", +"tgadventor", "tgheros", 0}; const char * const known_kurier_fonts[] = { "kurier", "kurierl", "kurier-condensed", "kurier-light-condensed", 0}; diff --git a/src/version.h b/src/version.h index beafab344f..f8452f8b2d 100644 --- a/src/version.h +++ b/src/version.h @@ -30,8 +30,8 @@ extern char const * const lyx_version_info; // Do not remove the comment below, so we get merge conflict in // independent branches. Instead add your own. -#define LYX_FORMAT_LYX 466 // spitz: powerdot updates -#define LYX_FORMAT_TEX2LYX 466 // spitz: powerdot updates +#define LYX_FORMAT_LYX 467 // uwestoehr: iwona font support +#define LYX_FORMAT_TEX2LYX 467 // uwestoehr: iwona font support #if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX #ifndef _MSC_VER