christophhart / HISE

The open source framework for sample based instruments
http://hise.audio
Other
946 stars 111 forks source link

HISE not properly loading custom fonts when the font's metadata matches the one that's already loaded #508

Open aaronventure opened 2 months ago

aaronventure commented 2 months ago
  1. Take font file
  2. Edit it, using FontForge, FontLab etc. Change glyphs, scale it, whatever. Keep metadata the same
  3. Save a copy
  4. Load the original font file in HISE using loadFontAs()
  5. Use it in a paint routine etc.
  6. Change the filename to that of the edited font file and recompile

Expected: See edited font in use.

Observed: Edited font not in use. Quitting and reloading project loads in the new font.

Does HISE properly reload fonts on F5 compile, or does it just read metadata and ignore if same font already exists? If this impacts compile speed in any significant way, perhaps Shift+F5 could properly re-load all the font files?

christoph-hart commented 1 month ago

Yeah I would suggest that fiddling with the font files directly justifies a reload of HISE - that's a super niche edge case and I would prefer the benefits of keeping a font cache during the lifetime of the HISE instance.

aaronventure commented 1 month ago

How is it different than swapping out for another font completely? If you're trying out multiple custom fonts, you do this all the time. But when you edit one and want to see the changes reflected, it warrants a complete reload.