Comments (7)
Hi, thanks for the details information. I will try to fix it or provide a way to change the font family paths.
from fontawesome5.
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.
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
_ With Resource Dictionary _ - Loads from library
_ With Helper to set Fontfamilies _
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.
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.
I updated the develop branch in FontAwesome5.Pro with the changes.
from fontawesome5.
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.
Just tried the ImageSourceSvgConverter and it works brilliantly:
from fontawesome5.
Related Issues (20)
- Incorrect icons HOT 1
- FontAwesome5.Generator 64bits HOT 1
- Add support for .net core HOT 9
- Visibility is not working HOT 4
- Not All Icons Work? HOT 10
- Can't render multiple instances of one icon in the same context using a single Style? HOT 2
- How to use the spin property? HOT 2
- Implement Pulse animation HOT 2
- XAML Namespace different to Charri/FontAwesome HOT 1
- Reduce DLL size? HOT 1
- Pro duotone icons can have either singular or multiple paths HOT 4
- CreateImageSource seems to render in low quality HOT 4
- Version 2.1.0 does not work with UWP & Windows Build newer than 16299 HOT 2
- New icons - cart minus and cart arrow up HOT 1
- STA error when creating new instance from a non-master thread HOT 2
- WinUI 3 support HOT 1
- Build error: DocumentationFile property in csproj HOT 1
- is dll signed? HOT 1
- Version "2.1.5" or "2.1.6" stopped working in "net6.0-windows10.0.19041.0" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fontawesome5.