Philosophical questions about the fontNames
Mark Waddingham
mark at livecode.com
Thu Mar 12 03:46:02 EDT 2020
On 2020-03-11 23:38, Paul Dupuis via use-livecode wrote:
> I filled a bug report on this back in February:
> https://quality.livecode.com/show_bug.cgi?id=22564
>
> Mark Waddingham declared it was not a bug but a documentation issue,
> so I filed and enhancement request:
> https://quality.livecode.com/show_bug.cgi?id=22569
>
> Personally, I think the following code SHOULD work:
>
> set the textFont of fld "X" to "(Text)"
> put the effective textFont of fld "X"
>
> And return the actual font used for (Text) on the current platform
> (for example Segue UI on Windows 10.
>
> My goal was to be able to read somewhere like in the dictionary or
> user guide or run some code to find out what the actual font is for
> each of the "specials" on Windows and macOS.
To be accurate, your request / report is entirely different from
Richard's
philosophical question.
You want 'the effective fontName' of a chunk / object to return the
actual
name of the font which the system is using to render the glyphs - which
would be huge departure from its current (very LC-specific) meaning.
Also I did not declare it a documentation issue (because it is not). My
exact wording was:
"I suspect it is possible to get the names of the actual system-provided
fonts - but there is no facility in LiveCode for this at present. Please
file an enhancement request for this ability."
This is precisely because the mapping is not fixed. Both Windows and
Linux
allow the user to change the relevant fonts used at the system level,
and
macOS uses highly-specialized UI fonts for the purpose (as Klaus and I
recently discovered when he was having a problem with text extraction
from
PDFs printed from LC!).
My current point of view is that this need represents an edge-case, and
it
is more than likely that changing your approach to whatever it is you
believe
you need it for means you won't...
So, an important question is here why do you need to know the actual
font
being used when an object is set to render with one of the meta-(theme)-
fonts?
Warmest Regards,
Mark.
--
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
More information about the use-livecode
mailing list