[squeak-dev] The Trunk: Graphics-mt.456.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Dec 31 11:50:01 UTC 2021
Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-mt.456.mcz
==================== Summary ====================
Name: Graphics-mt.456
Author: mt
Time: 31 December 2021, 12:49:55.337496 pm
UUID: ca084a4c-d28b-b54b-af9b-ae8d9cbfcd80
Ancestors: Graphics-mt.455
Quickfix for re-initialization of pre-rendered DejaVu Sans.
=============== Diff against Graphics-mt.455 ===============
Item was changed:
----- Method: StrikeFont class>>createDejaVu: (in category 'font creation') -----
createDejaVu: pointSize
"Warning: Uses the methods in 'dejaVu font data' category, that will be removed soon (or are already removed) to save space."
+ | base bold oblique boldOblique point actualPointSize |
- | base bold oblique boldOblique point |
point := pointSize asString.
+ actualPointSize := self fixDejaVuPointSIze: pointSize.
base := (StrikeFont new
buildFromForm: (self perform: ('dejaVuSansBook', point, 'Form') asSymbol)
data: (self perform: ('dejaVuSansBook', point, 'Data') asSymbol)
name: 'Bitmap DejaVu Sans ', point)
+ pointSize: actualPointSize.
- pointSize: pointSize.
bold := (StrikeFont new
buildFromForm: (self perform: ('dejaVuSansBold', point, 'Form') asSymbol)
data: (self perform: ('dejaVuSansBold', point, 'Data') asSymbol)
name: 'Bitmap DejaVu Sans ', point, 'B')
emphasis: 1;
+ pointSize: actualPointSize.
- pointSize: pointSize.
oblique := (StrikeFont new
buildFromForm: (self perform: ('dejaVuSansOblique', point, 'Form') asSymbol)
data: (self perform: ('dejaVuSansOblique', point, 'Data') asSymbol)
name: 'Bitmap DejaVu Sans ', point, 'I')
emphasis: 2;
+ pointSize: actualPointSize.
- pointSize: pointSize.
boldOblique := (StrikeFont new
buildFromForm: (self perform: ('dejaVuSansBoldOblique', point, 'Form') asSymbol)
data: (self perform: ('dejaVuSansBoldOblique', point, 'Data') asSymbol)
name: 'Bitmap DejaVu Sans ', point, 'BI')
emphasis: 3;
+ pointSize: actualPointSize.
- pointSize: pointSize.
base derivativeFont: bold at: 1.
base derivativeFont: oblique at: 2.
base derivativeFont: boldOblique at: 3.
^base!
Item was changed:
----- Method: StrikeFont class>>createDejaVuDark: (in category 'font creation') -----
createDejaVuDark: pointSize
+ | base bold oblique boldOblique point actualPointSize |
- | base bold oblique boldOblique point |
point := pointSize asString.
+ actualPointSize := self fixDejaVuPointSIze: pointSize.
base := (StrikeFont new
buildFromForm: (self perform: ('dejaVuSansBookDark', point, 'Form') asSymbol)
data: (self perform: ('dejaVuSansBookDark', point, 'Data') asSymbol)
name: 'Darkmap DejaVu Sans', point)
+ pointSize: actualPointSize.
- pointSize: pointSize.
bold := (StrikeFont new
buildFromForm: (self perform: ('dejaVuSansBoldDark', point, 'Form') asSymbol)
data: (self perform: ('dejaVuSansBoldDark', point, 'Data') asSymbol)
name: 'Darkmap DejaVu Sans', point, 'B')
emphasis: 1;
+ pointSize: actualPointSize.
- pointSize: pointSize.
oblique := (StrikeFont new
buildFromForm: (self perform: ('dejaVuSansObliqueDark', point, 'Form') asSymbol)
data: (self perform: ('dejaVuSansObliqueDark', point, 'Data') asSymbol)
name: 'Darkmap DejaVu Sans', point, 'I')
emphasis: 2;
+ pointSize: actualPointSize.
- pointSize: pointSize.
boldOblique := (StrikeFont new
buildFromForm: (self perform: ('dejaVuSansBoldObliqueDark', point, 'Form') asSymbol)
data: (self perform: ('dejaVuSansBoldObliqueDark', point, 'Data') asSymbol)
name: 'Darkmap DejaVu Sans', point, 'BI')
emphasis: 3;
+ pointSize: actualPointSize.
- pointSize: pointSize.
base derivativeFont: bold at: 1.
base derivativeFont: oblique at: 2.
base derivativeFont: boldOblique at: 3.
^base!
Item was added:
+ ----- Method: StrikeFont class>>fixDejaVuPointSIze: (in category 'font creation') -----
+ fixDejaVuPointSIze: pointSize
+ "Maps the given pointSize to 96 ppi."
+
+ ^ (Dictionary newFrom: {
+ 7 -> 7.5.
+ 9 -> 10.5.
+ 12 -> 14.5.
+ 14 -> 16.5.
+ 17 -> 19.5.
+ 20 -> 23.5}) at: pointSize
+ !
More information about the Squeak-dev
mailing list
|