Giter Club home page Giter Club logo

Comments (9)

saftle avatar saftle commented on September 27, 2024 1

Well, I would hate for you to buy it, since the game on its own is broken in a lot of ways. I am a part of a modding community where we are trying to fix up a bunch of games and wanted to use your mod to fix the font when rendering the game at its native resolution of 640x384 (and upscaled with https://github.com/mashakos/OmniScaler/). The font would be great to replace anyways, but also it smashes together at the native resolution.

I don't mind grabbing it for you at all in order to invest in a possible fix (even if it isn't possible) :)

Also you are free to join us on discord if you would like :) https://www.discord.gg/bSnpVBV

from fontmod.

ysc3839 avatar ysc3839 commented on September 27, 2024

Maybe the game is not using GDI font. In my memory, many games using it's own font system instead of operating system's.
While FontMod supports only GDI font, it doesn't work with a game not using GDI font.

Another possible issue is that FontMod is loaded too late. Maybe the game has finished loading fonts before FontMod being loaded into the game process.

Both situation requires you using some debugging tools to check. Unfortunately I don't have this game, so I can't check it.
(I can use a priated version game. But I think it's not good.)

from fontmod.

saftle avatar saftle commented on September 27, 2024

Thank you so much for responding! The game does appear to load GDI fonts, based on what I've found using a hex editor.

I'd love to buy the game for you on Steam. Add me on Steam, and I'll grab it. https://steamcommunity.com/id/saftle/. It would be the least I could do.

from fontmod.

ysc3839 avatar ysc3839 commented on September 27, 2024

@saftle You don't need to buy the game for me, I think it's expensive. I can wait for a discount and buy it.

from fontmod.

saftle avatar saftle commented on September 27, 2024

Good news. We have more information now. A modder in our discord found out that the game actually uses GDI+ and not GDI. They said that the fontmod currently doesn't support GDI+, which is why it doesn't work in the game. Is GDI+ planned in the future?

from fontmod.

ysc3839 avatar ysc3839 commented on September 27, 2024

@saftle IIRC GDI+ is using GDI font system, instead it get characters glyph and render itself.

from fontmod.

ysc3839 avatar ysc3839 commented on September 27, 2024

After some testing I found GDI+ is not using GDI font on Win10. Looks like it's using DirectWrite.

from fontmod.

ysc3839 avatar ysc3839 commented on September 27, 2024

After some investigate, I think it's not easy to fully support GDI+.

When using GDI+ to render text:

  1. Create a font family by it's name. (GdipCreateFontFamilyFromName)
  2. Create a font using font family, size and style. (GdipCreateFont)
  3. Render text using that font.

I can't get the name and style in the same function, so I have to keep track of the font family pointer -> font name relation. However the font family can be copied, so the relation would be incomplete.
Another solution is to get font family name (GdipGetFamilyName) every time before font created and check if it match rules, but I think it's inefficient.

from fontmod.

zqdalianchina avatar zqdalianchina commented on September 27, 2024

{ "fonts":
{ "SimSun":
{ "replace":
"HarmonyOS Sans SC",
"#size": 0,
"#width": 0,
"#weight": 0,
"#italic": false,
"#underLine": false,
"#strikeOut": false
},

    "Open Sans": { 
        "replace": "HarmonyOS Sans SC", 
        "#size": 0, 
        "#width": 0, 
        "#weight": 0, 
        "#italic": false, 
        "#underLine": false, 
        "#strikeOut": false 
    }, 
    "Open Sans Semibold": { 
        "replace": "HarmonyOS Sans SC", 
        "#size": 0, 
        "#width": 0, 
        "#weight": 0, 
        "#italic": false, 
        "#underLine": false, 
        "#strikeOut": false 
    }, 
    "Arial": { 
        "replace": "HarmonyOS Sans SC", 
        "#size": 0, 
        "#width": 0, 
        "#weight": 0, 
        "#italic": false, 
        "#underLine": false, 
        "#strikeOut": false 
    } 
}, 
"debug": false 

}

from fontmod.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.