Re: Adjusting Font Size to fit View Rectangle

Alex Zavatone

I do think that based on your requirements, there will have been others who have solved this. I just found a few solutions on Stack Overflow that could be adopted to MacOS.

Will send off list.

On Sep 20, 2018, at 4:51 AM, Dave <dave@...> wrote:


Those two methods alter the frame size, I want to keep the same Frame Size but reduce the Font Size of the Content until it fit into the Displayable Area. I’m 99% sure there is a method to do it but maybe its iOS only?

All the Best

On 20 Sep 2018, at 02:02, Alex Zavatone via Groups.Io <zav@...> wrote:

There are two that I am aware of. sizeToFit and sizeThatFits.
On Sep 19, 2018, at 1:29 PM, Dave <dave@...> wrote:

Hi All,

Is there a Cocoa method I can use that will return the best fitting Font Size for a given String and Font?

I seem to remember using a method that does it but can’t seem to find it any more…..

All the Best

Join to automatically receive all group messages.