Giter Site home page Giter Site logo

Comments (12)

makepaddev avatar makepaddev commented on July 19, 2024

Right now we don't have a fix for that, but we are working on deploying via cargo, which will solve this problem. For now patch up some paths, but it'l be fixed in the next release.

from makepad.

Eragonfr avatar Eragonfr commented on July 19, 2024

Where is defined these path ? In which file ?

from makepad.

makepaddev avatar makepaddev commented on July 19, 2024

Right now in widget/src/widgetstyle.rs you see 2 font paths. Try making those absolute.

from makepad.

rsaccon avatar rsaccon commented on July 19, 2024

I got around this current problem by adding a resources folder containing the font files a the root of my project.

from makepad.

makepaddev avatar makepaddev commented on July 19, 2024

That works too. We'll fix this nicely soon with makepad released on crates.io.

from makepad.

teohhanhui avatar teohhanhui commented on July 19, 2024

Just want to note that deploying the resources directory alongside the binary is not a solution, as it goes against (most?) packaging guidelines.

Ran into this issue while creating an AUR package. For now I'll patch.

from makepad.

makepaddev avatar makepaddev commented on July 19, 2024

It's not nice no, but i need some place to get the font files. So there will need to be a resources/fonts directory somewhere.

from makepad.

Eragonfr avatar Eragonfr commented on July 19, 2024

Is it possible to change the font to use the system fonts ? On linux it's something like /usr/share/fonts/… using a patch file you can temporary change the code to use a system folder.
I'v searched where are the references to this folder inside the code, if i remember this folder is referenced only 2 or three times.

Also it can be a great idea to set the font/resources folder inside a str or a String somewhere in the code, so it's simple to change the location of this folder.

EDIT: misconstruction of my comment, sorry

from makepad.

makepaddev avatar makepaddev commented on July 19, 2024

Yea thats a possibility. I'll review it next iteration when we push to crates.io, its been on the todo list.

from makepad.

teohhanhui avatar teohhanhui commented on July 19, 2024

there will need to be a resources/fonts directory somewhere.

Sure, but it needs to respect the system directories. On Arch Linux this would be /usr/share/makepad: https://wiki.archlinux.org/index.php/Arch_package_guidelines#Directories

There's https://crates.io/crates/dirs which can help with finding the right directories.

from makepad.

makepaddev avatar makepaddev commented on July 19, 2024

Also relying on system fonts is a road to hell though. Its going to be different on every platform, or not work at all.

from makepad.

makepaddev avatar makepaddev commented on July 19, 2024

Thanks that seems useful, i'll use that when we fix that bit up.

from makepad.

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.