- Kaunas, Lithuania
- https://aras-p.info/
- Joined on
2022-01-20
There is still one thing I didn't fully understand: the key for the
Map<std::string, int> name_to_mem_font_id;
. Technically, it is not enough to use just the data-block name: you can have a…
To me it does feel a bit weird that the order then would be: [Font], [Color], [Font Size]. It kinda "feels" subjectively better when font size is right next to font. But this might be just…
Yeah, in theory possible. This whole "font id is just an index" would be much better served by an actual "handle" thing (some bits index into an array, other bits "generation counter" that could…
remove this lie this is for keep fonts threads safe comment from the BLF_load_unique
Yeah it is a confusing comment. It kinda does make sense, if you manage to find a years-ago-made commit…
Otherwise I am still confused: how exactly current state of the PR solves the threading issue? Prefetch happens from a background thread, so it never can load font?
Fonts for all text strips…
So the actual font loading function (BLF_load_unique
) is still not thread safe, in case multiple threads would call it at the same time. Since it finds a free slot in the global fonts array, and…
Was simpler to do, since font loading could potentially happen from within do_text_effect which locks the mutex, but then font loading function also locks the same mutex. Is there a downside for…
Fonts can either be loaded from file, or from memory (datablock). These maps are mapping path/name to font id, for file and datablock fonts respectively. Should be clarified in a comment I guess?
Not really, but perhaps it should be added indeed. From what I can tell, refcounting for fonts was added by Richard back when he added custom fonts support to sequencer many years ago.
@iss right, but in the PR that fixes that issue, this issue will also get solved.