[squeak-dev] The Trunk: Graphics-mt.525.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Jun 22 10:46:34 UTC 2022
Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-mt.525.mcz
==================== Summary ====================
Name: Graphics-mt.525
Author: mt
Time: 22 June 2022, 12:46:23.837723 pm
UUID: c0630d5f-4682-a145-8772-6cb4dc77a34a
Ancestors: Graphics-mt.524
Clarify commentary from prior commit. Fix typo. Sorry for the noise.
=============== Diff against Graphics-mt.524 ===============
Item was changed:
----- Method: Number>>em (in category '*Graphics-scale factor') -----
em
+ "Documentation only. Please use #pt or #px instead. Convert the receiver from multiples of width-of-capital-letter-M to pixels using the system's default font. Works also with pre-rendered fonts."
- "Convert the receiver from multiples of width-of-capital-letter-M to pixels using the system's default font. Works also with pre-rendered fonts."
^ (self * (TextStyle defaultFont widthOf: $M)) rounded!
Item was changed:
----- Method: Number>>ex (in category '*Graphics-scale factor') -----
ex
+ "Documentation only. Please use #pt or #px instead. Convert the receiver from multiples of x-height-of-font to pixels using the system's default TrueType font."
- "Convert the receiver from multiples of x-height-of-font to pixels using the system's default TrueType font."
+ | font description |
+ font := TextStyle defaultTTFont.
+ description := font ttcDescription.
- | tt |
- tt := TextStyle defaultTTFont ttcDescription.
^ (self asFloat
+ * (description xHeight asFloat / description unitsPerEm)
+ * (font widthOf: $M)) rounded!
- * (tt xHeight asFloat / tt unitsPerEm)
- * (TextStyle defaultFont widthOf: $M)) rounded!
More information about the Squeak-dev
mailing list
|