I’ve noticed when setting up my user interface that when selecting some of the built-in fonts in OSX for use in a textfield, that not all of them have proper vertical alignment. Some appear more at the top of the textfield, some more at the bottom.
I can mitigate this to a small degree by altering the font size or the height of the textfield, but this often results in having to use a tiny font size or an over sized textfield.
Is there a way to get any selected font to center vertically in a textfield ? Or even a simple way to modify the font file itself to make this happen ?
I have some really nice looking fonts here but can’t use them because of this. The height of my text fields is normally 22 or 23.
Norman already told you. Fonts are designed with different ascenders and descenders. There is no way to change that.
There could be a way to have a custom TextField that centers vertically by placing a TextField on a ContainerControl. If you use a higher TextField, say 30 points, you can vary its position relative to the ContainerControl top, so the instance of the ContainerControl will show the text in different vertical positions.
I’m looking to see if there is a way to get any chosen font centered vertically, which looks far batter.[/quote]
[quote=212705:@Norman Palardy]Different fonts have different amounts of leading and other metics which affect how they align vertically
You’d have to make you control larger or smaller based on the font they use[/quote]
There you go
You also need to test with a Retina display, with Yosemite font rendering was never quite the same on a non-retina display, some other system metrics are also a little funky on a non-retina screen. Look at the X in the close box of a window.
Well the app is for my own use at this time and I don’t have a retina mac nor do I have access to one. My current model is the 27 inch late 2013 iMac.
If the rumours are true, Apple is planning to release a 4K 23 inch iMac model some time soon; apparently code for it has been spotted in recent Apple releases. If they do, it is a model I will definitely be interested in.
Yes, that’s the precedent and it looks likely we’ll see another smaller event in the next few weeks. Either that or they’ll just quietly announce a few updates on the website which they’ve also often done.