Commit edafec91 authored by David Fuhrmann's avatar David Fuhrmann Committed by Felix Paul Kühne

macosx: Fix font selection when some fonts are disabled

Usage of selectedFont inside changeFont: is not allowed, and its
not needed as all the necessary work is done in convertFont:.

close #13740

(cherry picked from commit bf31a6b4648b803be4d45829e6d29e7d640a6787)
Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent a5a54a9e
...@@ -1286,8 +1286,12 @@ static inline void save_string_list(intf_thread_t * p_intf, id object, const cha ...@@ -1286,8 +1286,12 @@ static inline void save_string_list(intf_thread_t * p_intf, id object, const cha
- (void)changeFont:(id)sender - (void)changeFont:(id)sender
{ {
NSFont * font = [sender convertFont:[[NSFontManager sharedFontManager] selectedFont]]; NSFont *someFont = [NSFont systemFontOfSize:12];
[o_osd_font_fld setStringValue:[font fontName]];
// converts given font to changes in font panel. Original font is irrelevant
NSFont *selectedFont = [sender convertFont:someFont];
[o_osd_font_fld setStringValue:[selectedFont fontName]];
[self osdSettingChanged:self]; [self osdSettingChanged:self];
} }
......
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