vcl/inc/font/OpenTypeFeatureStrings.hrc           |    3 ---
 vcl/source/font/OpenTypeFeatureDefinitionList.cxx |    5 +----
 2 files changed, 1 insertion(+), 7 deletions(-)

New commits:
commit de159e1ea264dae35cae90af24700bf971f065be
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Thu Jul 28 18:06:36 2022 +0200
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Jul 29 17:07:23 2022 +0200

    tdf#126754: Wrong OpenType tag for fractions in "font features" dialog
    
    Opentype defines only "frac" and not parameters values like 1 or 2 for 
"frac"
    
    See:
    https://en.wikipedia.org/wiki/List_of_typographic_features
    https://docs.microsoft.com/en-us/typography/opentype/spec/features_fj
    
    So remove STR_FONT_FEATURE_ID_FRAC_PARAM_0/1/2
    + remove the extra ":" for STR_FONT_FEATURE_ID_FRAC
    
    I gave a try with "Alegraya" font, it worked.
    I also give a try with "Linux Biolinum G", there are still "None" (value 
"0"), "Diagonal fractions" (value "1") and "Nut fractions" (value "2").
    It seems they're on the font itself like entry "'frac' Diagonal and nut 
Fractions".
    
    So it shouldn't bring regression.
    
    Change-Id: I2f46a3f4a53dc498b764dbeb1c1266589cc8d8c7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137574
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>
    Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137590

diff --git a/vcl/inc/font/OpenTypeFeatureStrings.hrc 
b/vcl/inc/font/OpenTypeFeatureStrings.hrc
index 5e1960b95613..15876c9562c0 100644
--- a/vcl/inc/font/OpenTypeFeatureStrings.hrc
+++ b/vcl/inc/font/OpenTypeFeatureStrings.hrc
@@ -41,9 +41,6 @@
 #define STR_FONT_FEATURE_ID_EXPT          NC_("STR_FONT_FEATURE_ID_EXPT", 
"Expert Forms")
 #define STR_FONT_FEATURE_ID_FALT          NC_("STR_FONT_FEATURE_ID_FALT", 
"Final Glyph on Line Alternates")
 #define STR_FONT_FEATURE_ID_FRAC          NC_("STR_FONT_FEATURE_ID_FRAC", 
"Fraction style:")
-#define STR_FONT_FEATURE_ID_FRAC_PARAM_0  
NC_("STR_FONT_FEATURE_ID_FRAC_PARAM_0", "None")
-#define STR_FONT_FEATURE_ID_FRAC_PARAM_1  
NC_("STR_FONT_FEATURE_ID_FRAC_PARAM_1", "Diagonal Fractions")
-#define STR_FONT_FEATURE_ID_FRAC_PARAM_2  
NC_("STR_FONT_FEATURE_ID_FRAC_PARAM_2", "Nut Fractions")
 #define STR_FONT_FEATURE_ID_FWID          NC_("STR_FONT_FEATURE_ID_FWID", 
"Full Widths")
 #define STR_FONT_FEATURE_ID_HALT          NC_("STR_FONT_FEATURE_ID_HALT", 
"Alternate Half Widths")
 #define STR_FONT_FEATURE_ID_HIST          NC_("STR_FONT_FEATURE_ID_HIST", 
"Historical Forms")
diff --git a/vcl/source/font/OpenTypeFeatureDefinitionList.cxx 
b/vcl/source/font/OpenTypeFeatureDefinitionList.cxx
index bd60c0e3bd32..f49837ccec43 100644
--- a/vcl/source/font/OpenTypeFeatureDefinitionList.cxx
+++ b/vcl/source/font/OpenTypeFeatureDefinitionList.cxx
@@ -45,10 +45,7 @@ void OpenTypeFeatureDefinitionListPrivate::init()
         { featureCode("dpng"), STR_FONT_FEATURE_ID_DPNG },
         { featureCode("expt"), STR_FONT_FEATURE_ID_EXPT },
         { featureCode("falt"), STR_FONT_FEATURE_ID_FALT },
-        { featureCode("frac"), STR_FONT_FEATURE_ID_FRAC,
-          std::vector<FeatureParameter>{ { 0, STR_FONT_FEATURE_ID_FRAC_PARAM_0 
},
-                                         { 1, STR_FONT_FEATURE_ID_FRAC_PARAM_1 
},
-                                         { 2, STR_FONT_FEATURE_ID_FRAC_PARAM_2 
} } },
+        { featureCode("frac"), STR_FONT_FEATURE_ID_FRAC },
         { featureCode("fwid"), STR_FONT_FEATURE_ID_FWID },
         { featureCode("halt"), STR_FONT_FEATURE_ID_HALT },
         { featureCode("hist"), STR_FONT_FEATURE_ID_HIST },

Reply via email to