[vlc-devel] [PATCH] macosx: Use -apple-system font on about panel

Marvin Scholz epirat07 at gmail.com
Fri Sep 9 16:57:04 CEST 2016


This patch will add the -apple-system font to the
font-family used for the About panel font.
On El Capitan and higher it will use the native
system font.
On Yosemite and lower it will automatically
fallback to the next font in the list,
either Helvetica Neue or Lucida Grande.
---
 modules/gui/macosx/VLCAboutWindowController.m | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/modules/gui/macosx/VLCAboutWindowController.m b/modules/gui/macosx/VLCAboutWindowController.m
index 838858c..9a5e5fa 100644
--- a/modules/gui/macosx/VLCAboutWindowController.m
+++ b/modules/gui/macosx/VLCAboutWindowController.m
@@ -140,12 +140,9 @@ - (void)windowDidLoad
                                  "DVDs, network streams, capture cards and other media formats!</p><p><a href="
                                  "\"http://www.videolan.org/contribute/\"><span style=\" text-decoration: "
                                  "underline; color:#0057ae;\">Help and join us!</span></a>"));
-    NSString *fontfamily;
-    if (OSX_YOSEMITE || OSX_EL_CAPITAN || OSX_SIERRA)
-        fontfamily = @"Helvetica Neue";
-    else
-        fontfamily = @"Lucida Grande";
-    NSString *joinUsWithStyle = [NSString stringWithFormat:@"<div style=\"text-align:left;font-family:%@;\">%@</div>",
+
+    NSString *fontfamily = (OSX_YOSEMITE) ? @"Helvetica Neue" : @"Lucida Grande";
+    NSString *joinUsWithStyle = [NSString stringWithFormat:@"<div style=\"text-align:left;font-family: -apple-system, %@;\">%@</div>",
                                  fontfamily, joinus];
     NSAttributedString *joinus_readytorender = [[NSAttributedString alloc] initWithHTML:[joinUsWithStyle dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES] options:[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:NSUTF8StringEncoding] forKey:NSCharacterEncodingDocumentOption] documentAttributes:NULL];
     [o_joinus_txt setAllowsEditingTextAttributes: YES];
-- 
2.7.4 (Apple Git-66)



More information about the vlc-devel mailing list