[Enhancement] Support for special characters(♪.★,♥,♣) in game font (issue#3180) (#3535)
* added specialCharacters: "♪.★,♥,♣" * did refactoring...maybe * added note
This commit is contained in:
parent
34bf932722
commit
6ea0f3f18b
Binary file not shown.
|
@ -26,6 +26,7 @@ const unicodeRanges = {
|
|||
kana: "U+3040-30FF",
|
||||
CJKCommon: "U+2E80-2EFF,U+3000-303F,U+31C0-31EF,U+3200-32FF,U+3400-4DBF,U+F900-FAFF,U+FE30-FE4F",
|
||||
CJKIdeograph: "U+4E00-9FFF",
|
||||
specialCharacters: "U+266A,U+2605,U+2665,U+2663" //♪.★,♥,♣
|
||||
};
|
||||
const rangesByLanguage = {
|
||||
korean: [unicodeRanges.CJKCommon, unicodeRanges.hangul].join(","),
|
||||
|
@ -34,6 +35,15 @@ const rangesByLanguage = {
|
|||
};
|
||||
|
||||
const fonts: Array<LoadingFontFaceProperty> = [
|
||||
// unicode (special character from PokePT)
|
||||
{
|
||||
face: new FontFace("emerald", "url(./fonts/PokePT_Wansung.woff2)", { unicodeRange: unicodeRanges.specialCharacters }),
|
||||
},
|
||||
{
|
||||
face: new FontFace("pkmnems", "url(./fonts/PokePT_Wansung.woff2)", { unicodeRange: unicodeRanges.specialCharacters }),
|
||||
extraOptions: { sizeAdjust: "133%" },
|
||||
},
|
||||
// unicode (korean)
|
||||
{
|
||||
face: new FontFace("emerald", "url(./fonts/PokePT_Wansung.woff2)", { unicodeRange: rangesByLanguage.korean }),
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue