[squeak-dev] The Trunk: Graphics-mt.466.mcz

Thiede, Christoph 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
An: squeak-dev
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 ====================

Name: Graphics-mt.466
Author: mt
Time: 24 January 2022, 11:24:34.965852 am
UUID: d9911a4f-0e24-cc42-9144-457e9ff9960e
Ancestors: Graphics-mt.465

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') -----
+ hasFixedWidth
+        "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...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220325/1b197ec1/attachment.html>

More information about the Squeak-dev mailing list