Commit 1bff0b7f authored by Naohiro KORIYAMA's avatar Naohiro KORIYAMA Committed by Felix Paul Kühne

macosx: fixed font selector panel on certain setups

Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 73b27054
......@@ -1212,12 +1212,11 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
- (IBAction)showFontPicker:(id)sender
{
char * font = config_GetPsz( p_intf, "freetype-font" );
NSString * fontFamilyName = font ? [NSString stringWithUTF8String: font] : nil;
NSString * fontName = font ? [NSString stringWithUTF8String: font] : nil;
free(font);
if( fontFamilyName )
if( fontName )
{
NSFontDescriptor * fd = [NSFontDescriptor fontDescriptorWithFontAttributes:nil];
NSFont * font = [NSFont fontWithDescriptor:[fd fontDescriptorWithFamily:fontFamilyName] textTransform:nil];
NSFont * font = [NSFont fontWithName:fontName size:0.0];
[[NSFontManager sharedFontManager] setSelectedFont:font isMultiple:NO];
}
[[NSFontManager sharedFontManager] setTarget: 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