From 4dc388b31ab48f2eeda9f32ec900ed11b7712e26 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Thu, 11 Jul 2019 20:28:34 +0200 Subject: [PATCH] Implement support for font options This revives a patch by Uwe and extends it. Additional options to font packages/fontspec can now be entered in Document Settings. This is principally also true for TeX fonts, if the new TeXFont tag MoreOptions is set. For the time being, I have only done this for MinionPro, as a model and prove of concept. Note that adding more TeXFonts requires a file format change, respectively, and changes to tex2lyx (in the same way as I've done for MinionPro). This addresses #8226 --- development/FORMAT | 8 + lib/latexfonts | 4 + lib/lyx2lyx/lyx_2_4.py | 169 +++++++++- src/Buffer.cpp | 3 + src/BufferParams.cpp | 57 +++- src/BufferParams.h | 6 + src/LaTeXFonts.cpp | 25 +- src/LaTeXFonts.h | 8 +- src/frontends/qt4/GuiDocument.cpp | 62 +++- src/frontends/qt4/GuiDocument.h | 2 + src/frontends/qt4/ui/FontUi.ui | 529 +++++++++++++++++------------- src/tex2lyx/Preamble.cpp | 132 ++++++-- src/tex2lyx/Preamble.h | 3 + src/version.h | 4 +- 14 files changed, 719 insertions(+), 293 deletions(-) diff --git a/development/FORMAT b/development/FORMAT index 2f4097c3bf..0c3bf536a4 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -7,6 +7,14 @@ changes happened in particular if possible. A good example would be ----------------------- +2019-07-11 Uwe Stöhr + Jürgen Spitzmüller + * Format incremented to 580: support for document font options + New buffer parameters + - \fonts_roman_opts + - \fonts_sans_opts + - \fonts_typewriter_opts + 2019-07-11 Jürgen Spitzmüller * Format incremented to 579: Add support for \babelfont. diff --git a/lib/latexfonts b/lib/latexfonts index 0c753df6cc..56c1d7e16b 100644 --- a/lib/latexfonts +++ b/lib/latexfonts @@ -22,6 +22,7 @@ # ScOption