Soreepeong / FFXIV-FontChanger

Apache License 2.0
47 stars 1 forks source link

ttmp mod pack not work in Penumbra for chinese client. #2

Closed toshiya14 closed 2 years ago

toshiya14 commented 2 years ago

图片

I have tried compressed and uncompressed, both not work.

The preset I am using:

{
    "discardStep": 1,
    "faces": [
        {
            "elements": [
                {
                    "gamma": 1.0,
                    "lookup": {
                        "name": "ChnAXIS",
                        "stretch": 5,
                        "style": 0,
                        "weight": 400
                    },
                    "mergeMode": 1,
                    "renderSpecific": {
                        "directwrite": {
                            "gridFitMode": 2,
                            "measureMode": 1,
                            "renderMode": 4
                        },
                        "empty": {
                            "ascent": 0,
                            "lineHeight": 0
                        },
                        "freetype": {
                            "forceAutohint": false,
                            "noAutohint": false,
                            "noBitmap": false,
                            "noHinting": false
                        }
                    },
                    "renderer": 1,
                    "size": 12.0,
                    "wrapModifiers": {
                        "baselineShift": 0,
                        "codepoints": [
                            [
                                57344,
                                63743
                            ]
                        ],
                        "horizontalOffset": 0,
                        "letterSpacing": 0
                    }
                },
                {
                    "gamma": 2.0,
                    "lookup": {
                        "name": "WenQuanYi Micro Hei",
                        "stretch": 5,
                        "style": 0,
                        "weight": 400
                    },
                    "mergeMode": 0,
                    "renderSpecific": {
                        "directwrite": {
                            "gridFitMode": 2,
                            "measureMode": 1,
                            "renderMode": 3
                        },
                        "empty": {
                            "ascent": 0,
                            "lineHeight": 0
                        },
                        "freetype": {
                            "forceAutohint": false,
                            "noAutohint": true,
                            "noBitmap": false,
                            "noHinting": true
                        }
                    },
                    "renderer": 2,
                    "size": 12.0,
                    "wrapModifiers": {
                        "baselineShift": 0,
                        "codepoints": [
                            [
                                0,
                                127
                            ],
                            [
                                128,
                                255
                            ],
                            [
                                256,
                                383
                            ],
                            [
                                384,
                                591
                            ],
                            [
                                688,
                                767
                            ],
                            [
                                768,
                                879
                            ],
                            [
                                880,
                                1023
                            ],
                            [
                                1024,
                                1279
                            ],
                            [
                                1280,
                                1327
                            ],
                            [
                                3584,
                                3711
                            ],
                            [
                                7680,
                                7935
                            ],
                            [
                                7936,
                                8191
                            ],
                            [
                                8192,
                                8303
                            ],
                            [
                                8304,
                                8351
                            ],
                            [
                                8352,
                                8399
                            ],
                            [
                                8448,
                                8527
                            ],
                            [
                                8528,
                                8591
                            ],
                            [
                                8592,
                                8703
                            ],
                            [
                                8704,
                                8959
                            ],
                            [
                                8960,
                                9215
                            ],
                            [
                                9312,
                                9471
                            ],
                            [
                                9472,
                                9599
                            ],
                            [
                                9600,
                                9631
                            ],
                            [
                                9632,
                                9727
                            ],
                            [
                                9728,
                                9983
                            ],
                            [
                                9984,
                                10175
                            ],
                            [
                                12288,
                                12351
                            ],
                            [
                                12352,
                                12447
                            ],
                            [
                                12448,
                                12543
                            ],
                            [
                                12544,
                                12591
                            ],
                            [
                                12592,
                                12687
                            ],
                            [
                                12800,
                                13055
                            ],
                            [
                                13056,
                                13311
                            ],
                            [
                                13312,
                                19903
                            ],
                            [
                                19968,
                                40959
                            ],
                            [
                                44032,
                                55215
                            ],
                            [
                                63744,
                                64255
                            ],
                            [
                                64256,
                                64335
                            ],
                            [
                                65072,
                                65103
                            ],
                            [
                                65104,
                                65135
                            ],
                            [
                                65136,
                                65279
                            ],
                            [
                                65280,
                                65519
                            ],
                            [
                                65520,
                                65535
                            ],
                            [
                                66560,
                                66639
                            ],
                            [
                                119552,
                                119647
                            ]
                        ],
                        "horizontalOffset": 0,
                        "letterSpacing": 0
                    }
                }
            ],
            "name": "ChnAXIS_120",
            "previewText": "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\r\n0英en-US: _The_ (89) quick brown foxes jump over the [01] lazy dogs.\r\n1日ja-JP: _パングラム_(pangram)で[23]つの字体(フォント)をテストします。\r\n2中zh-CN: _(天)地玄黃_,宇[宙]洪荒。蓋此身髮,4大5常。\r\n3韓ko-KR: 45 _다(람)쥐_ 67 헌 쳇바퀴에 타[고]파.\r\n4露ru-RU: Съешь (ж)е ещё этих мягких 23 [ф]ранцузских булок да 45 выпей чаю.\r\n5泰th-TH: เป็นมนุษย์สุดประเสริฐเลิศคุณค่า\r\n6\r\n7\r\n8\r\n9\r\n\r\n\r\n"
        },
        {
            "elements": [
                {
                    "gamma": 1.0,
                    "lookup": {
                        "name": "ChnAXIS",
                        "stretch": 5,
                        "style": 0,
                        "weight": 400
                    },
                    "mergeMode": 0,
                    "renderSpecific": {
                        "directwrite": {
                            "gridFitMode": 2,
                            "measureMode": 1,
                            "renderMode": 4
                        },
                        "empty": {
                            "ascent": 0,
                            "lineHeight": 0
                        },
                        "freetype": {
                            "forceAutohint": false,
                            "noAutohint": false,
                            "noBitmap": false,
                            "noHinting": false
                        }
                    },
                    "renderer": 1,
                    "size": 14.0,
                    "wrapModifiers": {
                        "baselineShift": 0,
                        "codepoints": [
                            [
                                57344,
                                63743
                            ]
                        ],
                        "horizontalOffset": 0,
                        "letterSpacing": 0
                    }
                },
                {
                    "gamma": 3.0,
                    "lookup": {
                        "name": "WenQuanYi Micro Hei",
                        "stretch": 5,
                        "style": 0,
                        "weight": 400
                    },
                    "mergeMode": 0,
                    "renderSpecific": {
                        "directwrite": {
                            "gridFitMode": 2,
                            "measureMode": 1,
                            "renderMode": 2
                        },
                        "empty": {
                            "ascent": 0,
                            "lineHeight": 0
                        },
                        "freetype": {
                            "forceAutohint": false,
                            "noAutohint": false,
                            "noBitmap": false,
                            "noHinting": false
                        }
                    },
                    "renderer": 2,
                    "size": 14.0,
                    "wrapModifiers": {
                        "baselineShift": 0,
                        "codepoints": [
                            [
                                0,
                                127
                            ],
                            [
                                128,
                                255
                            ],
                            [
                                256,
                                383
                            ],
                            [
                                384,
                                591
                            ],
                            [
                                688,
                                767
                            ],
                            [
                                768,
                                879
                            ],
                            [
                                880,
                                1023
                            ],
                            [
                                1024,
                                1279
                            ],
                            [
                                1280,
                                1327
                            ],
                            [
                                3584,
                                3711
                            ],
                            [
                                7680,
                                7935
                            ],
                            [
                                7936,
                                8191
                            ],
                            [
                                8192,
                                8303
                            ],
                            [
                                8304,
                                8351
                            ],
                            [
                                8352,
                                8399
                            ],
                            [
                                8448,
                                8527
                            ],
                            [
                                8528,
                                8591
                            ],
                            [
                                8592,
                                8703
                            ],
                            [
                                8704,
                                8959
                            ],
                            [
                                8960,
                                9215
                            ],
                            [
                                9312,
                                9471
                            ],
                            [
                                9472,
                                9599
                            ],
                            [
                                9600,
                                9631
                            ],
                            [
                                9632,
                                9727
                            ],
                            [
                                9728,
                                9983
                            ],
                            [
                                9984,
                                10175
                            ],
                            [
                                12288,
                                12351
                            ],
                            [
                                12352,
                                12447
                            ],
                            [
                                12448,
                                12543
                            ],
                            [
                                12544,
                                12591
                            ],
                            [
                                12592,
                                12687
                            ],
                            [
                                12800,
                                13055
                            ],
                            [
                                13056,
                                13311
                            ],
                            [
                                13312,
                                19903
                            ],
                            [
                                19968,
                                40959
                            ],
                            [
                                44032,
                                55215
                            ],
                            [
                                63744,
                                64255
                            ],
                            [
                                64256,
                                64335
                            ],
                            [
                                65072,
                                65103
                            ],
                            [
                                65104,
                                65135
                            ],
                            [
                                65136,
                                65279
                            ],
                            [
                                65280,
                                65519
                            ],
                            [
                                65520,
                                65535
                            ],
                            [
                                66560,
                                66639
                            ],
                            [
                                119552,
                                119647
                            ]
                        ],
                        "horizontalOffset": 0,
                        "letterSpacing": 0
                    }
                }
            ],
            "name": "ChnAXIS_140",
            "previewText": "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\r\n0英en-US: _The_ (89) quick brown foxes jump over the [01] lazy dogs.\r\n1日ja-JP: _パングラム_(pangram)で[23]つの字体(フォント)をテストします。\r\n2中zh-CN: _(天)地玄黃_,宇[宙]洪荒。蓋此身髮,4大5常。\r\n3韓ko-KR: 45 _다(람)쥐_ 67 헌 쳇바퀴에 타[고]파.\r\n4露ru-RU: Съешь (ж)е ещё этих мягких 23 [ф]ранцузских булок да 45 выпей чаю.\r\n5泰th-TH: เป็นมนุษย์สุดประเสริฐเลิศคุณค่า\r\n6\r\n7\r\n8\r\n9\r\n\r\n\r\n"
        },
        {
            "elements": [
                {
                    "gamma": 1.0,
                    "lookup": {
                        "name": "ChnAXIS",
                        "stretch": 5,
                        "style": 0,
                        "weight": 400
                    },
                    "mergeMode": 0,
                    "renderSpecific": {
                        "directwrite": {
                            "gridFitMode": 2,
                            "measureMode": 1,
                            "renderMode": 4
                        },
                        "empty": {
                            "ascent": 0,
                            "lineHeight": 0
                        },
                        "freetype": {
                            "forceAutohint": false,
                            "noAutohint": false,
                            "noBitmap": false,
                            "noHinting": false
                        }
                    },
                    "renderer": 1,
                    "size": 18.0,
                    "wrapModifiers": {
                        "baselineShift": 0,
                        "codepoints": [
                            [
                                57344,
                                63743
                            ]
                        ],
                        "horizontalOffset": 0,
                        "letterSpacing": 0
                    }
                },
                {
                    "gamma": 3.0,
                    "lookup": {
                        "name": "WenQuanYi Micro Hei",
                        "stretch": 5,
                        "style": 0,
                        "weight": 400
                    },
                    "mergeMode": 0,
                    "renderSpecific": {
                        "directwrite": {
                            "gridFitMode": 2,
                            "measureMode": 1,
                            "renderMode": 4
                        },
                        "empty": {
                            "ascent": 0,
                            "lineHeight": 0
                        },
                        "freetype": {
                            "forceAutohint": false,
                            "noAutohint": true,
                            "noBitmap": true,
                            "noHinting": true
                        }
                    },
                    "renderer": 3,
                    "size": 18.0,
                    "wrapModifiers": {
                        "baselineShift": 0,
                        "codepoints": [
                            [
                                0,
                                127
                            ],
                            [
                                128,
                                255
                            ],
                            [
                                256,
                                383
                            ],
                            [
                                384,
                                591
                            ],
                            [
                                688,
                                767
                            ],
                            [
                                768,
                                879
                            ],
                            [
                                880,
                                1023
                            ],
                            [
                                1024,
                                1279
                            ],
                            [
                                1280,
                                1327
                            ],
                            [
                                3584,
                                3711
                            ],
                            [
                                7680,
                                7935
                            ],
                            [
                                7936,
                                8191
                            ],
                            [
                                8192,
                                8303
                            ],
                            [
                                8304,
                                8351
                            ],
                            [
                                8352,
                                8399
                            ],
                            [
                                8448,
                                8527
                            ],
                            [
                                8528,
                                8591
                            ],
                            [
                                8592,
                                8703
                            ],
                            [
                                8704,
                                8959
                            ],
                            [
                                8960,
                                9215
                            ],
                            [
                                9312,
                                9471
                            ],
                            [
                                9472,
                                9599
                            ],
                            [
                                9600,
                                9631
                            ],
                            [
                                9632,
                                9727
                            ],
                            [
                                9728,
                                9983
                            ],
                            [
                                9984,
                                10175
                            ],
                            [
                                12288,
                                12351
                            ],
                            [
                                12352,
                                12447
                            ],
                            [
                                12448,
                                12543
                            ],
                            [
                                12544,
                                12591
                            ],
                            [
                                12592,
                                12687
                            ],
                            [
                                12800,
                                13055
                            ],
                            [
                                13056,
                                13311
                            ],
                            [
                                13312,
                                19903
                            ],
                            [
                                19968,
                                40959
                            ],
                            [
                                44032,
                                55215
                            ],
                            [
                                63744,
                                64255
                            ],
                            [
                                64256,
                                64335
                            ],
                            [
                                65072,
                                65103
                            ],
                            [
                                65104,
                                65135
                            ],
                            [
                                65136,
                                65279
                            ],
                            [
                                65280,
                                65519
                            ],
                            [
                                65520,
                                65535
                            ],
                            [
                                66560,
                                66639
                            ],
                            [
                                119552,
                                119647
                            ]
                        ],
                        "horizontalOffset": 0,
                        "letterSpacing": 0
                    }
                }
            ],
            "name": "ChnAXIS_180",
            "previewText": "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\r\n0英en-US: _The_ (89) quick brown foxes jump over the [01] lazy dogs.\r\n1日ja-JP: _パングラム_(pangram)で[23]つの字体(フォント)をテストします。\r\n2中zh-CN: _(天)地玄黃_,宇[宙]洪荒。蓋此身髮,4大5常。\r\n3韓ko-KR: 45 _다(람)쥐_ 67 헌 쳇바퀴에 타[고]파.\r\n4露ru-RU: Съешь (ж)е ещё этих мягких 23 [ф]ранцузских булок да 45 выпей чаю.\r\n5泰th-TH: เป็นมนุษย์สุดประเสริฐเลิศคุณค่า\r\n6\r\n7\r\n8\r\n9\r\n\r\n\r\n"
        },
        {
            "elements": [
                {
                    "gamma": 1.0,
                    "lookup": {
                        "name": "ChnAXIS",
                        "stretch": 5,
                        "style": 0,
                        "weight": 400
                    },
                    "mergeMode": 0,
                    "renderSpecific": {
                        "directwrite": {
                            "gridFitMode": 2,
                            "measureMode": 1,
                            "renderMode": 4
                        },
                        "empty": {
                            "ascent": 0,
                            "lineHeight": 0
                        },
                        "freetype": {
                            "forceAutohint": false,
                            "noAutohint": false,
                            "noBitmap": false,
                            "noHinting": false
                        }
                    },
                    "renderer": 1,
                    "size": 36.0,
                    "wrapModifiers": {
                        "baselineShift": 0,
                        "codepoints": [
                            [
                                57344,
                                63743
                            ]
                        ],
                        "horizontalOffset": 0,
                        "letterSpacing": 0
                    }
                },
                {
                    "gamma": 2.0,
                    "lookup": {
                        "name": "WenQuanYi Micro Hei",
                        "stretch": 5,
                        "style": 0,
                        "weight": 400
                    },
                    "mergeMode": 0,
                    "renderSpecific": {
                        "directwrite": {
                            "gridFitMode": 2,
                            "measureMode": 1,
                            "renderMode": 4
                        },
                        "empty": {
                            "ascent": 0,
                            "lineHeight": 0
                        },
                        "freetype": {
                            "forceAutohint": false,
                            "noAutohint": true,
                            "noBitmap": false,
                            "noHinting": true
                        }
                    },
                    "renderer": 3,
                    "size": 36.0,
                    "wrapModifiers": {
                        "baselineShift": 0,
                        "codepoints": [
                            [
                                0,
                                127
                            ],
                            [
                                128,
                                255
                            ],
                            [
                                256,
                                383
                            ],
                            [
                                384,
                                591
                            ],
                            [
                                688,
                                767
                            ],
                            [
                                768,
                                879
                            ],
                            [
                                880,
                                1023
                            ],
                            [
                                1024,
                                1279
                            ],
                            [
                                1280,
                                1327
                            ],
                            [
                                3584,
                                3711
                            ],
                            [
                                7680,
                                7935
                            ],
                            [
                                7936,
                                8191
                            ],
                            [
                                8192,
                                8303
                            ],
                            [
                                8304,
                                8351
                            ],
                            [
                                8352,
                                8399
                            ],
                            [
                                8448,
                                8527
                            ],
                            [
                                8528,
                                8591
                            ],
                            [
                                8592,
                                8703
                            ],
                            [
                                8704,
                                8959
                            ],
                            [
                                8960,
                                9215
                            ],
                            [
                                9312,
                                9471
                            ],
                            [
                                9472,
                                9599
                            ],
                            [
                                9600,
                                9631
                            ],
                            [
                                9632,
                                9727
                            ],
                            [
                                9728,
                                9983
                            ],
                            [
                                9984,
                                10175
                            ],
                            [
                                12288,
                                12351
                            ],
                            [
                                12352,
                                12447
                            ],
                            [
                                12448,
                                12543
                            ],
                            [
                                12544,
                                12591
                            ],
                            [
                                12592,
                                12687
                            ],
                            [
                                12800,
                                13055
                            ],
                            [
                                13056,
                                13311
                            ],
                            [
                                13312,
                                19903
                            ],
                            [
                                19968,
                                40959
                            ],
                            [
                                44032,
                                55215
                            ],
                            [
                                63744,
                                64255
                            ],
                            [
                                64256,
                                64335
                            ],
                            [
                                65072,
                                65103
                            ],
                            [
                                65104,
                                65135
                            ],
                            [
                                65136,
                                65279
                            ],
                            [
                                65280,
                                65519
                            ],
                            [
                                65520,
                                65535
                            ],
                            [
                                66560,
                                66639
                            ],
                            [
                                119552,
                                119647
                            ]
                        ],
                        "horizontalOffset": 0,
                        "letterSpacing": 0
                    }
                }
            ],
            "name": "ChnAXIS_360",
            "previewText": "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\r\n0英en-US: _The_ (89) quick brown foxes jump over the [01] lazy dogs.\r\n1日ja-JP: _パングラム_(pangram)で[23]つの字体(フォント)をテストします。\r\n2中zh-CN: _(天)地玄黃_,宇[宙]洪荒。蓋此身髮,4大5常。\r\n3韓ko-KR: 45 _다(람)쥐_ 67 헌 쳇바퀴에 타[고]파.\r\n4露ru-RU: Съешь (ж)е ещё этих мягких 23 [ф]ранцузских булок да 45 выпей чаю.\r\n5泰th-TH: เป็นมนุษย์สุดประเสริฐเลิศคุณค่า\r\n6\r\n7\r\n8\r\n9\r\n\r\n\r\n"
        }
    ],
    "sideLength": 4096,
    "texFilenameFormat": "font_chn_{}.tex"
}
Soreepeong commented 2 years ago

I'll test this out later on. Meanwhile, you did pick the "Export (Compress while packing)", right? If you did so, what happens if you export it raw as fdt/tex, and then replace penumbra-imported files with newly exported files manually?

Also, note for self: include Jupiter and Miedinger fonts for chn/krnaxis fonts too. Use "font" in addition to ChnAXIS and/or KrnAXIS for that.

Soreepeong commented 2 years ago

Also, if you're to replace with general-purpose fonts, then make sure to keep all glyphs of original AXIS fonts there, and then use "Add All" or "Replace" instead of "Add New", like the below image. The game tended to do random stuff when I didn't do so.

image

toshiya14 commented 2 years ago

I'll test this out later on. Meanwhile, you did pick the "Export (Compress while packing)", right? If you did so, what happens if you export it raw as fdt/tex, and then replace penumbra-imported files with newly exported files manually?

~Also, note for self: include Jupiter and Miedinger fonts for chn/krnaxis fonts too.~ Use "font" in addition to ChnAXIS and/or KrnAXIS for that.

I used after and Do not compressed, both of them the font are disappeared.

I will try while as well lately.

Soreepeong commented 2 years ago

That is expected, as "after" and "do not compress" will result in essentially same files that a non-updated version of Penumbra cannot process, whereas "while" will result in a different file that it can accept.

toshiya14 commented 2 years ago

图片

This is the result of "while", but some characters are missing and some are strange. XD

toshiya14 commented 2 years ago

图片

Ah, if I export fdt and tex directly and replace the mod pack imported, everything seems to be OK then?

toshiya14 commented 2 years ago

Most of the font are working fine, but still having some missing fonts.

Modded: 图片 图片

Original: 图片 图片

Soreepeong commented 2 years ago

I'll get back to you after testing that font preset in intl client.

toshiya14 commented 2 years ago

If I change the renderer to DirectWrite, then the mission fonts are appeared. Maybe this is a bug of FreeType renderer.

Here is my final preset. https://gist.github.com/toshiya14/f4d255152b398194bbd6c006e0d25530

Soreepeong commented 2 years ago

ChnAXIS - WenQuanYi Micro Hei.zip

Can you try this too?

This one is done in the most reliable way for me, and it preserves the original game's line height and stuff. For each entry:

  1. Add base game font
  2. Add font you want with the glyph range you want
  3. Add font you want again, with the all glyph range the font supports, but as "Replace" mode
Soreepeong commented 2 years ago

For FreeType one, I'll test it out. Sounds like there's some sort of multithreading problems, which I'll look into.

toshiya14 commented 2 years ago

For the second entry, should I use Add All or something else?

Soreepeong commented 2 years ago

Either Add All or Add New is fine, as it will be overwritten with the following entry.

toshiya14 commented 2 years ago

I tried the preset you have posted. Everything is strange. XD

图片

图片

Soreepeong commented 2 years ago

Can you changing base family from AXIS to ChnAXIS and try again? It shouldn't have made any difference, but just in case.

toshiya14 commented 2 years ago

图片

图片

This is very OK!!