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

Marvin Scholz git at videolan.org
Thu Sep 22 11:34:25 CEST 2016


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Fri Sep  9 16:57:04 2016 +0200| [941a256636307423105b09a115b068a29bc00961] | committer: Felix Paul Kühne

macosx: Use -apple-system font on about panel

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.

Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=941a256636307423105b09a115b068a29bc00961
---

 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 @@
                                  "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];



More information about the vlc-commits mailing list