[vlc-commits] macosx: fixed font selector panel on certain setups
Naohiro KORIYAMA
git at videolan.org
Sun Jul 1 01:42:28 CEST 2012
vlc | branch: master | Naohiro KORIYAMA <nkoriyama at gmail.com> | Sun Jul 1 01:38:27 2012 +0200| [1bff0b7fe088ebbb50837b484df44c9f4467526b] | committer: Felix Paul Kühne
macosx: fixed font selector panel on certain setups
Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1bff0b7fe088ebbb50837b484df44c9f4467526b
---
modules/gui/macosx/simple_prefs.m | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index 1f07c9d..414815e 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -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];
More information about the vlc-commits
mailing list