Open tinchodias opened 1 year ago
A tip to investigate: To make the screen capture with the expected output, I touched the code to use a new instance of FT_Face for each line.
I'm debugging a bit more. Recent versions and with integration of Harfbuzz and Cairo show it again.
Versions:
{ AeCairoLibrary uniqueInstance versionString.
AeFTLibrary newInitialized versionString.
AeHarfbuzzLibrary uniqueInstance versionString }.
">>> #('1.18.0' '2.13.2' '8.3.0')"
Script:
string := (WideString streamContents: [ :stream |
#( 16r1F468 16r1F469 16r1F467 16r1F466 )
do: [ :each | stream nextPut: (Unicode value: each) ]
separatedBy: [ stream nextPut: Unicode zeroWidthJoiner ]]).
fontSize := 150.
blob := AeHbBlob newLocatedAt:AeNotoColorEmojiDownloadedFont new fileReference.
blob faceCount.
face := blob newHbFaceAtIndex: 0.
font := face newHbFont.
cairoFontOptions :=
AeCairoFontOptions new
hintMetrics: AeCairoHintMetrics off;
hintStyle: AeCairoHintStyle none;
colorMode: AeCairoGlyphColorMode color;
yourself.
cairoFontFace := font newCairoFontFace.
cairoSurface := AeCairoImageSurface
extent: 1000 @ (fontSize * 2)
format: AeCairoSurfaceFormat argb32.
cairoSurface status ensureIsSuccess.
cairoContext := cairoSurface newContext.
cairoContext translateByX: 0 y: (fontSize * 1.0).
cairoContext sourceColor: Color blue.
cairoContext fontFace: cairoFontFace.
cairoContext fontSize: fontSize.
cairoContext fontOptions: cairoFontOptions.
cairoScaledFont := cairoContext scaledFont.
glyphArray := cairoScaledFont glyphArrayForString: string.
cairoContext showGlyphs: glyphArray.
cairoSurface inspect.
But still to close this issue:
Execute this example: AeHarfbuzzRenderExample class>>#example6Emoji
It should look as this capture (without Harfbuzz on top, with Harfbuzz bottom):
But you get a blank form