aboutsummaryrefslogtreecommitdiffstats
path: root/src/macfont.m
diff options
context:
space:
mode:
authorK. Handa2016-01-03 17:53:43 +0900
committerK. Handa2016-01-03 17:53:43 +0900
commitfb6d826c69939c2d016c1b824d4e9bcb53d9e643 (patch)
treeb9ce862d6cbe25e740203421984df21e4cbadbf4 /src/macfont.m
parent536f48e9a2251b9e654ea974bd90ff2f40218753 (diff)
parent91917dd58ec5278e555b9c693a830749083e8f89 (diff)
downloademacs-fb6d826c69939c2d016c1b824d4e9bcb53d9e643.tar.gz
emacs-fb6d826c69939c2d016c1b824d4e9bcb53d9e643.zip
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'src/macfont.m')
-rw-r--r--src/macfont.m19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/macfont.m b/src/macfont.m
index fae284fad89..3023fbea78c 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -771,7 +771,7 @@ mac_font_descriptor_get_adjusted_weight (CTFontDescriptorRef desc, CGFloat val)
771{ 771{
772 long percent_val = lround (val * 100); 772 long percent_val = lround (val * 100);
773 773
774 if (percent_val == -40 || percent_val == 56) 774 if (percent_val == -40)
775 { 775 {
776 CTFontRef font = NULL; 776 CTFontRef font = NULL;
777 CFStringRef name = 777 CFStringRef name =
@@ -786,19 +786,10 @@ mac_font_descriptor_get_adjusted_weight (CTFontDescriptorRef desc, CGFloat val)
786 { 786 {
787 CFIndex weight = mac_font_get_weight (font); 787 CFIndex weight = mac_font_get_weight (font);
788 788
789 if (percent_val == -40) 789 /* Workaround for crash when displaying Oriya characters
790 { 790 with Arial Unicode MS on OS X 10.11. */
791 /* Workaround for crash when displaying Oriya characters 791 if (weight == 5)
792 with Arial Unicode MS on OS X 10.11. */ 792 val = 0;
793 if (weight == 5)
794 val = 0;
795 }
796 else /* percent_val == 56 */
797 {
798 if (weight == 9)
799 /* Adjustment for HiraginoSans-W7 on OS X 10.11. */
800 val = 0.4;
801 }
802 CFRelease (font); 793 CFRelease (font);
803 } 794 }
804 } 795 }