Code Monkey home page Code Monkey logo

Comments (7)

MartinTopfstedt avatar MartinTopfstedt commented on May 27, 2024

Hi, thanks for the details information. I will try to fix it or provide a way to change the font family paths.

from fontawesome5.

MartinTopfstedt avatar MartinTopfstedt commented on May 27, 2024

Hi,

ok i committed a fix in develop, where you can adjust the Font families in the Fonts class. I provided as well another way to reference the Fonts through a ResourceDictionary (see Readme.md), which was mentioned in the ticket you posted.

It would be great if you could give me feedback, if this fix worked for you.

from fontawesome5.

pedrosbanioles avatar pedrosbanioles commented on May 27, 2024

Hi Martin,

It took me some time to test, as our application is wired into the pro version. But I can confirm that with these changes I am able to use configuration to derive a path to the physical files.

The only issue I came across was the context from which we are loading, whereby we have a forms application hooking in some WPF views which meant that I needed to add the following code:

if (Application.Current == null)
{
    new Application();
}

It might be beneficial then to just add some Application.Current null checks in those Typeface getters.

When I remapped to using the Free version, remapped icon usage to accommodate and added the application initialization to set the current application:

Out of the Box - Loads from library

image

_ With Resource Dictionary _ - Loads from library

image

_ With Helper to set Fontfamilies _

image

So having this facility is great as it means we can have a path defined in configuration for the files and be able to set those absolute paths to the fonts and circumnavigate this strange issue.

Thank you very much for looking into this and getting a solution for us so fast.

As we are using the Pro Version, will this be incorporated into that build in the near future?

from fontawesome5.

MartinTopfstedt avatar MartinTopfstedt commented on May 27, 2024

Hi, ok this means the ResourceDictionary solution did not work at all. I removed it. I improved the Fonts class with some static functions for saving the Resource files to any directory (Fonts.SaveFontFilesToDirectory) and a function for setting the Font Families to load from a specific directory(Fonts.LoadFromDirectory).

Now the Fonts static constructor will save the otfs files to the users temporary directory and load it from there, as default behaviour. I kept a Fonts.LoadFromResource method to activate the old behaviour, if it gets fixed.

I will copy these changes over to the FontAwesome5.Pro repository.

FYI: I added an ImageSourceSvgConverter, which uses the SVG information instead of the font. This should solve the problem as well.

Thanks for the great help. :)

from fontawesome5.

MartinTopfstedt avatar MartinTopfstedt commented on May 27, 2024

I updated the develop branch in FontAwesome5.Pro with the changes.

from fontawesome5.

pedrosbanioles avatar pedrosbanioles commented on May 27, 2024

Thanks again Martin, completely forgot to test the SvgConverter as well, ill give that a whirl tomorrow and let you know how it goes.

from fontawesome5.

pedrosbanioles avatar pedrosbanioles commented on May 27, 2024

Just tried the ImageSourceSvgConverter and it works brilliantly:

image

from fontawesome5.

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.