mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fix assertion during Font fallback
Since 4122427748 assertions are guarding
the FontOptions::withName, withStyle and withTypeface member functions.
Since then the only way to replace an existing typeface without hitting
these assertions is to clear all three fields before calling
withTypeface, which then sets all three values. It is always legal to
just clear an existing Typeface and rely on the name and style fields.
This commit is contained in:
parent
df45c4ae9f
commit
4828bd886d
1 changed files with 3 additions and 0 deletions
|
|
@ -275,6 +275,9 @@ public:
|
|||
jassert (getReferenceCount() == 1);
|
||||
typeface = newTypeface;
|
||||
|
||||
if (typeface != nullptr)
|
||||
options = options.withTypeface (nullptr).withName ("").withStyle ("");
|
||||
|
||||
options = options.withTypeface (typeface);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue