Code Monkey home page Code Monkey logo

Comments (5)

Susko3 avatar Susko3 commented on July 20, 2024

https://github.com/kenter7317/DreamofSomeone/blob/a05ca34e2da9211f5081b7f792b2f2f542125c53/DreamofSomeone.Game/DreamofSomeoneGame.cs#L19

You'll probably want to remove Resources/ from the font asset name, as that is implied.

-AddFont(Resources, @"Resources/Fonts/210omnigulim010/210omnigulim010");
+AddFont(Resources, @"Fonts/210omnigulim010/210omnigulim010");

See how osu! does it:
https://github.com/ppy/osu/blob/e0e790fa9412368ff7b414791348476f05e28f2f/osu.Game/OsuGameBase.cs#L448

from osu-framework.

kenter7317 avatar kenter7317 commented on July 20, 2024

this error happend because dll resources has different name or path to real path. please add this solution to wiki

  1. find.Resources/bin/.Game.dll
  2. open that dll file using assembly viewer
  3. check the real font file path inside the dll, and correct code.
    @peppy

from osu-framework.

bdach avatar bdach commented on July 20, 2024

@kenter7317 i'm confused. did the removal of the Resources prefix fix it? or did you do something else entirely?

i'm not sure why the wiki has the prefixes to be fair, neither framework or game has them.

from osu-framework.

kenter7317 avatar kenter7317 commented on July 20, 2024

I remove that prefix resources and corrected path. that prefix may be implied

AddFont(*Resources*, path)

but still the Framework couldn't find my font, then I try some other steps, finally I find that Framework find path's Resources in the dll file. then check assembly. and fix them, in my case. the right path is Fonts/210omnigulim/_210omnigulim

I'll commit this changes and comment my code, I'm sorry about availabilities of misunderstanding your comment, cuz I'm foreigners

from osu-framework.

bdach avatar bdach commented on July 20, 2024

Okay sure that checks out, but that is because you've accidentally hit a stupid implementation detail of embedded resources. If the name of an embedded resource starts with a digit it will apparently get automatically an underscore prepended to it. See https://stackoverflow.com/questions/14705211/how-is-net-renaming-my-embedded-resources.

I'll remove the error from the wiki and also add a note to not start the name of the resource with a digit I guess.

from osu-framework.

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.