Text alignment issue in iOS 26.4

There appears to be a serious issue in iOS 26.4 regarding text alignment.

All text strings are rendered right-aligned instead of left-aligned, even when explicitly setting the paragraph style to NSTextAlignmentLeft.

This behavior is unexpected and seems to indicate a regression in text rendering. Could you please confirm whether this is a known issue in iOS 26.4?

I am using the following code in a central function that has been working reliably for years across all my apps.

Best regards, Rolf

Code:

NSMutableParagraphStyle* paragraphLeft = [[NSMutableParagraphStyle alloc] init];

if (paragraphLeft != nil) {

paragraphLeft.alignment = NSTextAlignmentLeft;

NSDictionary *settings = @{

	NSFontAttributeName             :  font,

	NSForegroundColorAttributeName  :  fontclr,

	NSParagraphStyleAttributeName   :  paragraphLeft

	};
    
[theString drawAtPoint:CGPointMake(x, y - font.ascender) withAttributes:settings];
    
[paragraphLeft release];

}

Answered by RolfS in 881766022

As a temporary workaround, I have replaced the system font with Helvetica Neue in the affected parts of my apps. This is not an ideal solution, but it allows users to continue using the apps without the rendering problems observed on iOS 26.4.

I would still appreciate any information regarding the underlying issue with system font rendering, as I would prefer to return to the system font in the future if possible.

After additional testing, I found that the issue is specifically related to the system font:

When using: UIFont* font = [UIFont systemFontOfSize:20]; or UIFont* font = [UIFont systemFontOfSize:20 weight:UIFontWeightRegular];

the text is rendered incorrectly (appearing right-aligned or partially clipped) on iOS 26.4.

When switching to a named font such as:

UIFont* font = [UIFont fontWithName:@"Arial" size:20];

the exact same drawing code produces correct results.

I also tested multiple system font variants (including different weights and monospaced digit system fonts), and all system font variants exhibit the same incorrect behavior.

This strongly suggests that the issue is related to system font rendering in combination with drawAtPoint:withAttributes: (and drawInRect:) on iOS 26.4.

Important: switching to a different font is not a viable workaround for me. The affected drawing routine is a central part of multiple apps and is used in hundreds of places. Changing the font would significantly alter the appearance and require extensive regression testing across multiple iOS versions.

Given that the same code worked correctly for years and still works on iOS 26.2, this appears to be a regression in iOS 26.4.

Could you please confirm whether this is a known issue, or advise on a safe and compatible solution?

Accepted Answer

As a temporary workaround, I have replaced the system font with Helvetica Neue in the affected parts of my apps. This is not an ideal solution, but it allows users to continue using the apps without the rendering problems observed on iOS 26.4.

I would still appreciate any information regarding the underlying issue with system font rendering, as I would prefer to return to the system font in the future if possible.

Hello RolfS,

I haven't come across this issue before. This might have to do with the specifics of your implementation. Glad to hear that you have a usable workaround. Please file a bug report and include a focused sample project (feel free to reuse your code snippet) that replicates this issue.

Once you open the bug report, please post the FB number here for my reference.

If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why?

If you're not familiar with preparing a test project, take a look at Creating a test project.

Thank you for reporting,

Richard Yeh  Developer Technical Support

Text alignment issue in iOS 26.4
 
 
Q