[squeak-dev] The Trunk: Graphics-mt.466.mcz
Christoph.Thiede at student.hpi.uni-potsdam.de
Fri Mar 25 20:04:31 UTC 2022
There might also be variable-width fonts similar to "Wingdings" that might assign custom icon to characters and could have the same width for $. and $w by accident. :P But Wingdings itself is not affected, I have checked.
By the way, maybe you already saw this, but this is how some other environments test this: https://stackoverflow.com/a/49299276/13994294
And for TrueType fonts, there appears to be optional metadata about monospacing: https://stackoverflow.com/a/43178653/13994294
But we don't seem to have easy access to this post table and it's probably not overly important. :D
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 7. Februar 2022 21:12:23
Betreff: Re: [squeak-dev] The Trunk: Graphics-mt.466.mcz
> How reliable can such a check be? :o
You tell me. :-) It would break if both characters match the fallback glyph. xD
Am 06.02.2022 19:22:37 schrieb Thiede, Christoph <christoph.thiede at student.hpi.uni-potsdam.de>:
How reliable can such a check be? :o
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von commits at source.squeak.org <commits at source.squeak.org>
Gesendet: Montag, 24. Januar 2022 11:24:58
An: squeak-dev at lists.squeakfoundation.org; packages at lists.squeakfoundation.org
Betreff: [squeak-dev] The Trunk: Graphics-mt.466.mcz
Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
==================== Summary ====================
Time: 24 January 2022, 11:24:34.965852 am
Adds a query to check whether a font has fixed-width glyphs. User terminology similar to TextStyle class >> #defaultFixed.
=============== Diff against Graphics-mt.465 ===============
Item was added:
+ ----- Method: AbstractFont>>hasFixedWidth (in category 'testing') -----
+ "Answer whether the receiver is a monospaced/fixed-width/non-proportional font. See TextStyle class >> #defaultFixed."
+ ^ (self widthOf: $.) = (self widthOf: $w)!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev