Scan text for unique characters (for Chinese, Japanese, Korean fonts)

the same. Just lua script in game, run them after texts update and copy print from console to font settings manually.

local utf8 = require "helper.utf8"

-----------------
local function uniqueSymbols(mytexttable)
    local unique={}
    local extra_characters=""
    for k,v in pairs(mytexttable) do
        if v then
            utf8.gsub(v,".", function(c)
            if  not unique[c] then
                unique[c]=1
                extra_characters=extra_characters..c
            else
                unique[c]=unique[c]+1
            end
            end)
        end
    end
    print(extra_characters)
end
4 Likes