Re: Font alignment when using bold variant of system font
Re: Font alignment when using bold variant of system font
- Subject: Re: Font alignment when using bold variant of system font
- From: Samuel Williams <email@hidden>
- Date: Sat, 15 Oct 2016 01:01:47 +1300
Just in case anyone finds this thread and wonders what the solution was,
here it is:
- (void) updateEditorHighlighting: (NSString*)expression
{
NSTextView * editor = (NSTextView*)[self currentEditor];
[self updateExpressionValue:self.stringValue into:editor.textStorage];
// This fixes a strange issue where the vertical alignment of the font is a
bit strange during editing.
NSMutableParagraphStyle * paragraphStyle = [[NSMutableParagraphStyle alloc]
init];
paragraphStyle.maximumLineHeight = [editor.layoutManager
defaultLineHeightForFont:self.font];
[editor.textStorage addAttribute:NSParagraphStyleAttributeName
value:paragraphStyle
range:NSMakeRange(0, editor.textStorage.length)];
}
On 13 October 2016 at 13:26, Samuel Williams <email@hidden
> wrote:
> That's crazy, how can Apple make a system font which breaks existing apps!?
>
> On 13 October 2016 at 12:19, Steve Mills <email@hidden> wrote:
>
>> > On Oct 12, 2016, at 16:55, Samuel Williams <
>> email@hidden> wrote:
>> >
>> > It's the standard font "San Francisco" from Apple. That's odd that it
>> would
>> > be buggy like that. I'll try what you suggested.
>>
>> Not surprising. The new San Francisco is pretty bad.
>>
>> Steve via iPad
>>
>>
>> _______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>> email@hidden
>>
>> This email sent to email@hidden
>
>
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden