diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-06-23 16:01:19 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-06-24 15:33:44 +0200 |
commit | a7af4bbbc0793fb78aea6a89f8fb6dc052710a11 (patch) | |
tree | 12a0711925e58904895f7a5a0cea7a6dafc04266 /vcl/inc | |
parent | 04645273d7c9dd6927035b571464148a38d3db9f (diff) |
vcl: treat description of cv** & ss** font features specially
To avoid adding descriptions for each of font features cv** and
ss**, where ** is a number between 00-99, process them separately
and just use one description for each. This simplifies translation
as we don't need to add 99 copy-paste translations but add a bit
more complexity when looking up the descriptions.
Change-Id: Ia6e9554af20355c90c73afeec33fd18c694865b9
Reviewed-on: https://gerrit.libreoffice.org/56317
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/font/OpenTypeFeatureDefinitonList.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/font/OpenTypeFeatureStrings.hrc | 33 |
2 files changed, 5 insertions, 31 deletions
diff --git a/vcl/inc/font/OpenTypeFeatureDefinitonList.hxx b/vcl/inc/font/OpenTypeFeatureDefinitonList.hxx index b5abb2708f4f..740043bbff56 100644 --- a/vcl/inc/font/OpenTypeFeatureDefinitonList.hxx +++ b/vcl/inc/font/OpenTypeFeatureDefinitonList.hxx @@ -30,6 +30,9 @@ private: void init(); + static bool isSpecialFeatureCode(sal_uInt32 nFeatureCode); + FeatureDefinition handleSpecialFeatureCode(sal_uInt32 nFeatureCode); + public: OpenTypeFeatureDefinitonListPrivate(); FeatureDefinition getDefinition(sal_uInt32 nFeatureCode); diff --git a/vcl/inc/font/OpenTypeFeatureStrings.hrc b/vcl/inc/font/OpenTypeFeatureStrings.hrc index 3ed3df4b90f4..a3d2179ceea7 100644 --- a/vcl/inc/font/OpenTypeFeatureStrings.hrc +++ b/vcl/inc/font/OpenTypeFeatureStrings.hrc @@ -33,17 +33,7 @@ #define STR_FONT_FEATURE_ID_CPCT NC_("STR_FONT_FEATURE_ID_CPCT", "Centered CJK Punctuation") #define STR_FONT_FEATURE_ID_CPSP NC_("STR_FONT_FEATURE_ID_CPSP", "Capital Spacing") #define STR_FONT_FEATURE_ID_CSWH NC_("STR_FONT_FEATURE_ID_CSWH", "Contextual Swash") -#define STR_FONT_FEATURE_ID_CV01 NC_("STR_FONT_FEATURE_ID_CV01", "Character Variant 1") -#define STR_FONT_FEATURE_ID_CV02 NC_("STR_FONT_FEATURE_ID_CV02", "Character Variant 2") -#define STR_FONT_FEATURE_ID_CV03 NC_("STR_FONT_FEATURE_ID_CV03", "Character Variant 3") -#define STR_FONT_FEATURE_ID_CV04 NC_("STR_FONT_FEATURE_ID_CV04", "Character Variant 4") -#define STR_FONT_FEATURE_ID_CV05 NC_("STR_FONT_FEATURE_ID_CV05", "Character Variant 5") -#define STR_FONT_FEATURE_ID_CV06 NC_("STR_FONT_FEATURE_ID_CV06", "Character Variant 6") -#define STR_FONT_FEATURE_ID_CV07 NC_("STR_FONT_FEATURE_ID_CV07", "Character Variant 7") -#define STR_FONT_FEATURE_ID_CV08 NC_("STR_FONT_FEATURE_ID_CV08", "Character Variant 8") -#define STR_FONT_FEATURE_ID_CV09 NC_("STR_FONT_FEATURE_ID_CV09", "Character Variant 9") -#define STR_FONT_FEATURE_ID_CV10 NC_("STR_FONT_FEATURE_ID_CV10", "Character Variant 10") -#define STR_FONT_FEATURE_ID_CV11 NC_("STR_FONT_FEATURE_ID_CV11", "Character Variant 11") +#define STR_FONT_FEATURE_ID_CVXX NC_("STR_FONT_FEATURE_ID_CVXX", "Character Variant %1") #define STR_FONT_FEATURE_ID_DCAP NC_("STR_FONT_FEATURE_ID_DCAP", "Drop Caps") #define STR_FONT_FEATURE_ID_DLIG NC_("STR_FONT_FEATURE_ID_DLIG", "Discretionary Ligatures") #define STR_FONT_FEATURE_ID_DNOM NC_("STR_FONT_FEATURE_ID_DNOM", "Denominators") @@ -91,26 +81,7 @@ #define STR_FONT_FEATURE_ID_SINF NC_("STR_FONT_FEATURE_ID_SINF", "Scientific Inferiors") #define STR_FONT_FEATURE_ID_SMCP NC_("STR_FONT_FEATURE_ID_SMCP", "Lowercase to Small Capitals") #define STR_FONT_FEATURE_ID_SMPL NC_("STR_FONT_FEATURE_ID_SMPL", "Simplified Forms") -#define STR_FONT_FEATURE_ID_SS01 NC_("STR_FONT_FEATURE_ID_SS01", "Stylistic Set 1") -#define STR_FONT_FEATURE_ID_SS02 NC_("STR_FONT_FEATURE_ID_SS02", "Stylistic Set 2") -#define STR_FONT_FEATURE_ID_SS03 NC_("STR_FONT_FEATURE_ID_SS03", "Stylistic Set 3") -#define STR_FONT_FEATURE_ID_SS04 NC_("STR_FONT_FEATURE_ID_SS04", "Stylistic Set 4") -#define STR_FONT_FEATURE_ID_SS05 NC_("STR_FONT_FEATURE_ID_SS05", "Stylistic Set 5") -#define STR_FONT_FEATURE_ID_SS06 NC_("STR_FONT_FEATURE_ID_SS06", "Stylistic Set 6") -#define STR_FONT_FEATURE_ID_SS07 NC_("STR_FONT_FEATURE_ID_SS07", "Stylistic Set 7") -#define STR_FONT_FEATURE_ID_SS08 NC_("STR_FONT_FEATURE_ID_SS08", "Stylistic Set 8") -#define STR_FONT_FEATURE_ID_SS09 NC_("STR_FONT_FEATURE_ID_SS09", "Stylistic Set 9") -#define STR_FONT_FEATURE_ID_SS10 NC_("STR_FONT_FEATURE_ID_SS10", "Stylistic Set 10") -#define STR_FONT_FEATURE_ID_SS11 NC_("STR_FONT_FEATURE_ID_SS11", "Stylistic Set 11") -#define STR_FONT_FEATURE_ID_SS12 NC_("STR_FONT_FEATURE_ID_SS12", "Stylistic Set 12") -#define STR_FONT_FEATURE_ID_SS13 NC_("STR_FONT_FEATURE_ID_SS13", "Stylistic Set 13") -#define STR_FONT_FEATURE_ID_SS14 NC_("STR_FONT_FEATURE_ID_SS14", "Stylistic Set 14") -#define STR_FONT_FEATURE_ID_SS15 NC_("STR_FONT_FEATURE_ID_SS15", "Stylistic Set 15") -#define STR_FONT_FEATURE_ID_SS16 NC_("STR_FONT_FEATURE_ID_SS16", "Stylistic Set 16") -#define STR_FONT_FEATURE_ID_SS17 NC_("STR_FONT_FEATURE_ID_SS17", "Stylistic Set 17") -#define STR_FONT_FEATURE_ID_SS18 NC_("STR_FONT_FEATURE_ID_SS18", "Stylistic Set 18") -#define STR_FONT_FEATURE_ID_SS19 NC_("STR_FONT_FEATURE_ID_SS19", "Stylistic Set 19") -#define STR_FONT_FEATURE_ID_SS20 NC_("STR_FONT_FEATURE_ID_SS20", "Stylistic Set 20") +#define STR_FONT_FEATURE_ID_SSXX NC_("STR_FONT_FEATURE_ID_SSXX", "Stylistic Set %1") #define STR_FONT_FEATURE_ID_SUBS NC_("STR_FONT_FEATURE_ID_SUBS", "Subscript") #define STR_FONT_FEATURE_ID_SUPS NC_("STR_FONT_FEATURE_ID_SUPS", "Superscript") #define STR_FONT_FEATURE_ID_SWSH NC_("STR_FONT_FEATURE_ID_SWSH", "Swash") |