JuliaGraphics / FreeTypeAbstraction.jl

A Julian abstraction layer over FreeType.jl
Other
25 stars 20 forks source link

Fix loading of font assets #21

Closed musm closed 5 years ago

musm commented 5 years ago

I think the font loading logic is kinda borked since I have DejaVu Sans fonts installed by default but FreeTypeAbstraction pulls in the slanted bold version instead.

What this PR changes is to first search the additional_folders before the default font folders to locate the font. The following pop operation then pulls in the correct version.

This fixes the strange default font when using Makie.

musm commented 5 years ago

Also first commit uses SYSTEMROOT rather than the deprecated WINDIR which is there for NT and legacy systems

musm commented 5 years ago

@SimonDanisch any comments, can we merge / tag?

SimonDanisch commented 5 years ago

Looks good to me, but I'm relatively sure it doesn't really solve the core issue ;) For that we'll need to start checking the attributes of the font!

musm commented 5 years ago

Yes that's true, this only makes it so that we search the passed folder first, which anyways should probably be the default anyways..

Fixing loading can be another issue to fix after this.

SimonDanisch commented 5 years ago

Thank you!