mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
An installed family was added to the font database one file at a time, so a lookup on another thread could find it with only some of its styles: text falling back to Arial took Arial Bold Italic or Bold (its files sort first) for upright Regular text, and the same text laid out a moment later took Arial Regular. One Arabic word could even mix the two. Two threads loading the same family could also add a face twice. A family's files are now read and parsed first and their faces added under one lock, skipping faces another thread added meanwhile. Loading a family reports it loaded when another thread loaded it meanwhile, so the fallback search doesn't go on to other families. This made tests_bidi::a_change_of_paint_in_a_mixed_direction_line_moves_no_glyph fail intermittently when another test loaded Arial at the same time.