Commit 13e35edc authored by Felix Paul Kühne's avatar Felix Paul Kühne

quartztext: add basic font-fallback mechanism instead of crashing (close #9369)

parent 5a43b773
...@@ -534,8 +534,11 @@ static void setFontAttibutes(char *psz_fontname, int i_font_size, uint32_t i_fon ...@@ -534,8 +534,11 @@ static void setFontAttibutes(char *psz_fontname, int i_font_size, uint32_t i_fon
CFStringRef p_cfString; CFStringRef p_cfString;
CTFontRef p_font; CTFontRef p_font;
// Handle font name and size // fallback on default
p_cfString = CFStringCreateWithCString(NULL, if (!psz_fontname)
psz_fontname = (char *)DEFAULT_FONT;
p_cfString = CFStringCreateWithCString(kCFAllocatorDefault,
psz_fontname, psz_fontname,
kCFStringEncodingUTF8); kCFStringEncodingUTF8);
p_font = CTFontCreateWithName(p_cfString, p_font = CTFontCreateWithName(p_cfString,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment