[vlc-commits] macosx: fixed font selector panel on certain setups

Naohiro KORIYAMA git at videolan.org
Mon Jul 2 14:30:33 CEST 2012


vlc/vlc-2.0 | branch: master | Naohiro KORIYAMA <nkoriyama at gmail.com> | Sun Jul  1 01:38:27 2012 +0200| [5eaac683e14b7d1bff093f1cd5484186f4e684ee] | committer: Felix Paul Kühne

macosx: fixed font selector panel on certain setups

Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>
(cherry picked from commit 1bff0b7fe088ebbb50837b484df44c9f4467526b)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=5eaac683e14b7d1bff093f1cd5484186f4e684ee
---

 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 c5dfa69..56c941e 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -1206,12 +1206,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