View Single Post
04/06/22, 09:33 PM   #5
Balgamov
Join Date: Apr 2021
Posts: 8
Originally Posted by Sharlikran View Post
Read the information at this link.

Don't copy the routine con2CNKR because they do that since the game does not support Korean Glyphs form Hangul.

However, if you look at that file there is a way to assign fonts to everything in the game. Not just in the tr_pregame.str or tr_client.str files but from the mod. The function fontChangeWhenInit should run through the table for fontFaces so that the game has your font properly assigned so you can see the Turkish glyphs.
I understand you perfectly but problem is I don't know how coding works, so I had to copy fontChangeWhenInit part. This is what I did ;

- I added some lines from EsoKR and changed it with TurkishScrollsOnline (inside .lua):

Code:
function TurkishScrollsOnline:fontChangeWhenInit()
    local path = TurkishScrollsOnline:getFontPath()
    local pair = { "ZO_TOOLTIP_STYLES", "ZO_CRAFTING_TOOLTIP_STYLES", "ZO_GAMEPAD_DYEING_TOOLTIP_STYLES" }
    local function f(x) return path .. x end
    local fontFaces = TurkishScrollsOnline.fontFaces

    for _, v in pairs(pair) do for k, fnt in pairs(fontFaces[v]) do _G[v][k]["fontFace"] = f(fnt) end end

    SetSCTKeyboardFont(f(fontFaces.UNI67) .. "|29|soft-shadow-thick")
    SetSCTGamepadFont(f(fontFaces.UNI67) .. "|35|soft-shadow-thick")
    SetNameplateKeyboardFont(f(fontFaces.UNI67), 4)
    SetNameplateGamepadFont(f(fontFaces.UNI67), 4)

    -- this is set up by TurkishScrollsOnline in fontFaces.lua
    -- ["Univers 55"] = UNI55,
    -- ["Univers 57"] = UNI57,
    -- ["Univers 67"] = UNI67,
    -- ["Skyrim Handwritten"] = HAND,
    -- ["ProseAntique"] = ANTIQUE,
    -- ["Trajan Pro"] = TRAJAN,
    -- ["Futura Condensed"] = FTN57,
    -- ["Futura Condensed Bold"] = FTN87,
    -- ["Futura Condensed Light"] = FTN47,
    for k, v in pairs(fontFaces.fonts) do
        LMP.MediaTable.font[k] = nil
        LMP:Register("font", k, f(v))
    end
    LMP:SetDefault("font", "Univers 57")

    -- Loop through list and make sure it is using ESORK Font
    local uni57 = f(fontFaces.UNI57)
    local uni47 = f(fontFaces.FTN47)
    local fontList = {
        "Arial Narrow",
        "Consolas",
        "ESO Cartographer",
        "Fontin Bold",
        "Fontin Italic",
        "Fontin Regular",
        "Fontin SmallCaps",
        "Futura Condensed",
    }
    for i = 1, #fontList do
        LMP.MediaTable.font[fontList[i]] = nil
        LMP:Register("font", fontList[i], uni57)
    end

    -- do single because it is different
    if LMP:Fetch("font", "Futura Light") ~= uni47 then
        LMP.MediaTable.font["Futura Light"] = nil
        LMP:Register("font", "Futura Light", uni47)
    end

    if LWF3 then
        LWF3.data.Fonts = {
            ["Arial Narrow"] = uni57,
            ["Consolas"] = uni57,
            ["ESO Cartographer"] = uni57,
            ["Fontin Bold"] = uni57,
            ["Fontin Italic"] = uni57,
            ["Fontin Regular"] = uni57,
            ["Fontin SmallCaps"] = uni57,
            ["Futura Condensed"] = uni57,
            ["Futura Light"] = path .. fontFaces.FTN47,
        }
        for k, v in pairs(fontFaces.fonts) do LWF3.data.Fonts[k] = f(v) end
    end

    if LWF4 then
        LWF4.data.Fonts = {
            ["Arial Narrow"] = uni57,
            ["Consolas"] = uni57,
            ["ESO Cartographer"] = uni57,
            ["Fontin Bold"] = uni57,
            ["Fontin Italic"] = uni57,
            ["Fontin Regular"] = uni57,
            ["Fontin SmallCaps"] = uni57,
            ["Futura Condensed"] = uni57,
            ["Futura Light"] = path .. fontFaces.FTN47,
        }
        for k, v in pairs(fontFaces.fonts) do LWF4.data.Fonts[k] = f(v) end
    end

    function ZO_TooltipStyledObject:GetFontString(...)
        local fontFace = self:GetProperty("fontFace", ...)
        local fontSize = self:GetProperty("fontSize", ...)

        if fontFace == "$(GAMEPAD_LIGHT_FONT)" then fontFace = f(fontFaces.FTN47) end
        if fontFace == "$(GAMEPAD_MEDIUM_FONT)" then fontFace = f(fontFaces.FTN57) end
        if fontFace == "$(GAMEPAD_BOLD_FONT)" then fontFace = f(fontFaces.FTN87) end

        if (fontFace and fontSize) then
            if type(fontSize) == "number" then
                fontSize = tostring(fontSize)
            end

            local fontStyle = self:GetProperty("fontStyle", ...)
            if (fontStyle) then
                return string.format("%s|%s|%s", fontFace, fontSize, fontStyle)
            else
                return string.format("%s|%s", fontFace, fontSize)
            end
        else
            return "ZoFontGame"
        end
    end
end

local function fontChangeWhenPlayerActivaited()
    local path = TurkishScrollsOnline:getFontPath()
    local function f(x) return path .. x end
    local fontFaces = TurkishScrollsOnline.fontFaces

    SetSCTKeyboardFont(f(fontFaces.UNI67) .. "|29|soft-shadow-thick")
    SetSCTGamepadFont(f(fontFaces.UNI67) .. "|35|soft-shadow-thick")
    SetNameplateKeyboardFont(f(fontFaces.UNI67), 4)
    SetNameplateGamepadFont(f(fontFaces.UNI67), 4)

end
- I took fontFaces.lua and changed EsoKR.fontFaces to TurkishScrollsOnline.fontFaces
- I created fontFaces folder inside mod and AddOns folder.
- Fonts that EsoKR using are same with my fonts (uni57,uni67,etc..) BUT my fonts have the letters that i said before. (ş,ğ,ü,ç..)

I realy need help for .lua file. I don't want to bother you with this but please, can you just look it up and tell me what is wrong ?
Attached Files
File Type: lua TurkishScrollsOnline.lua (8.5 KB, 202 views)
  Reply With Quote