diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-10-14 09:24:56 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-10-14 12:11:14 +0200 |
commit | b4be66f14abce2e817fd636f53433a8dc6c031fd (patch) | |
tree | 3b589df1864456d6826c24b4e4a5e3e917153cac /vcl/source/fontsubset | |
parent | 621fe7497a4f9e919e19e28c5682cfe77da1ed04 (diff) |
fix names of enums
as per...
https://docs.microsoft.com/en-us/typography/opentype/spec/cmap
encoding id 3 is PRC and 4 is Big5. We are already using
RTL_TEXTENCODING_GB_2312 for 3 and RTL_TEXTENCODING_BIG5 for 4
so this just changes the names of the enum but no logic change
Change-Id: Ie375cdc9c704641af21a3313128f4e97a5166ca5
Reviewed-on: https://gerrit.libreoffice.org/80755
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/fontsubset')
-rw-r--r-- | vcl/source/fontsubset/sft.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index 2f29ca97cbd3..fd6e6f96df10 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -1018,8 +1018,8 @@ enum cmapType { CMAP_MS_Symbol = 10, CMAP_MS_Unicode = 11, CMAP_MS_ShiftJIS = 12, - CMAP_MS_Big5 = 13, - CMAP_MS_PRC = 14, + CMAP_MS_PRC = 13, + CMAP_MS_Big5 = 14, CMAP_MS_Wansung = 15, CMAP_MS_Johab = 16 }; @@ -1219,8 +1219,8 @@ static void FindCmap(TrueTypeFont *ttf) sal_uInt32 ThreeZero = 0; /* MS Symbol */ sal_uInt32 ThreeOne = 0; /* MS UCS-2 */ sal_uInt32 ThreeTwo = 0; /* MS ShiftJIS */ - sal_uInt32 ThreeThree = 0; /* MS Big5 */ - sal_uInt32 ThreeFour = 0; /* MS PRC */ + sal_uInt32 ThreeThree = 0; /* MS PRC */ + sal_uInt32 ThreeFour = 0; /* MS Big5 */ sal_uInt32 ThreeFive = 0; /* MS Wansung */ sal_uInt32 ThreeSix = 0; /* MS Johab */ @@ -1284,10 +1284,10 @@ static void FindCmap(TrueTypeFont *ttf) ttf->cmapType = CMAP_MS_ShiftJIS; ttf->cmap = table + ThreeTwo; } else if (ThreeThree) { - ttf->cmapType = CMAP_MS_Big5; + ttf->cmapType = CMAP_MS_PRC; ttf->cmap = table + ThreeThree; } else if (ThreeFour) { - ttf->cmapType = CMAP_MS_PRC; + ttf->cmapType = CMAP_MS_Big5; ttf->cmap = table + ThreeFour; } else if (ThreeFive) { ttf->cmapType = CMAP_MS_Wansung; @@ -2263,8 +2263,8 @@ sal_uInt16 MapChar(TrueTypeFont const *ttf, sal_uInt16 ch) case CMAP_MS_Unicode: break; case CMAP_MS_ShiftJIS: ch = TranslateChar12(ch); break; - case CMAP_MS_Big5: ch = TranslateChar13(ch); break; - case CMAP_MS_PRC: ch = TranslateChar14(ch); break; + case CMAP_MS_PRC: ch = TranslateChar13(ch); break; + case CMAP_MS_Big5: ch = TranslateChar14(ch); break; case CMAP_MS_Wansung: ch = TranslateChar15(ch); break; case CMAP_MS_Johab: ch = TranslateChar16(ch); break; default: return 0; |