aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 }