-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Add test the "texte coupé" bug reported by @ELePors and @labordep
This probably implies adding Roboto font as downloadable.
This showed the bug:
aString := 'RAD'.
fontSize := 14.
ttfFileReference := '../fonts/Roboto/Roboto-Regular.ttf' asFileReference.
aeCanvas := AeCanvas extent: 100 @ 100.
aeCanvas clear: Color white.
ftLibrary := AeFTLibrary newInitialized.
ftFace := ftLibrary newFaceFromFile: ttfFileReference index: 0.
cairoScaledFont := aeCanvas scaledFontForFace: ftFace size: fontSize.
cairoGlyphsArray := cairoScaledFont glyphArrayForString: aString.
metrics :=
aeCanvas
metricsFor: cairoGlyphsArray
font: cairoScaledFont.
aeCanvas privateAeCairoContext
translateByX: 10 y: 10;
rectangleTo: metrics width @ metrics height;
clip;
sourceColor: Color yellow;
paint.
aeCanvas
setSourceColor: Color black;
pathTranslate: metrics bearingX negated @ metrics bearingY negated;
drawGlyphs: cairoGlyphsArray font: cairoScaledFont.
aeCanvas inspect.
aeCanvas writePngTo: '/tmp/a.png' asFileReference Metadata
Metadata
Assignees
Labels
No labels