Cross Platform Font Layout - current workarounds
J. Landman Gay
jacque at hyperactivesw.com
Mon Aug 24 22:43:37 EDT 2020
On August 24, 2020 5:01:54 PM "Sean Cole \(Pi\) via use-livecode"
<use-livecode at lists.runrev.com> wrote:
> The font IS embedded. Not a problem using the font itself. It is the same
> physical font on the two platforms. That's not what I'm asking when you
> read past paragraph one.
> HowTF do you get them to show up in the same 'fin place though (ie, the
> pixel placement of the text itself, baseline, etc) from one platform to the
Mac and Windows have always rendered fonts differently, the font rendering
is done by the OS. Talk to Apple, MicroSoft and Google about it (Android
and iOS are each unique too.) The text will always start at the same place
but will render differently from there depending on the OS. You may be able
to adjust the baselines by tinkering with the textheight per platform. You
will never exactly match the text wrap. In general I leave extra space in a
field to accomodate Windows font rendering. Here's why:
> Side note follow up:
> put fontstyles("Arial",0) - Put that in Windows and Mac messagebox and get
> two different results -- MIND BLOWN! It's 2020 people. This was solved back
> in the 70's, wasn't it? Who's overcomplicating this?
The various operating systems. LC asks the OS what fonts are available, and
each OS returns its own interpretation of what it has (apparently Windows
does more consolidation by font family than Mac.This is a disadvantage
sometimes when you do need to know the font file name in order to set a
specific style.) LC relies on the OS for a whole lot of its info and
operations, which it passes on to us. It could hardly do otherwise, without
writing its own OS.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode