Skip to content

Commit

Permalink
Merge pull request #58 from pharo-graphics/22-Bug-rendering-Zero-widt…
Browse files Browse the repository at this point in the history
…h-joiner-Unicode-sequences

Bug rendering zero width joiner unicode sequences
  • Loading branch information
tinchodias committed May 5, 2024
2 parents e48b87f + ce40b64 commit 410e8e0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Alexandrie-Canvas-Tests/AeCanvasTest.class.st
Expand Up @@ -303,7 +303,7 @@ AeCanvasTest >> renderEmoji [
| fontHeight aeCanvas cairoScaledFont cairoGlyphsArray |

self skip. "Randomly fails. We suspect we need a more recent version of cairo (it introduced improvements in this area)."

fontHeight := 25.
aeCanvas := AeCanvas extent: fontHeight * 1.3 asPoint.
aeCanvas clear: Color paleYellow.
Expand Down Expand Up @@ -388,8 +388,6 @@ AeCanvasTest >> renderLigatureTextWithHarfbuzz [
"Test Harfbuzz converting a 'ff' pair of letters into a single glyph."

| aString fontSize aeCanvas cairoScaledFont cairoGlyphsArray |
self skip.

aString := 'Office'.
fontSize := 19.
aeCanvas := AeCanvas extent: 50 @ 25.
Expand Down Expand Up @@ -480,8 +478,9 @@ AeCanvasTest >> renderOpenFigure [
AeCanvasTest >> renderZWJEmojiWithHarfbuzz [

| fontHeight aeCanvas cairoScaledFont cairoGlyphsArray |

self skip. "Randomly fails. We suspect we need a more recent version of cairo (it introduced improvements in this area)."

fontHeight := 24.
aeCanvas := AeCanvas extent: 200 @ (fontHeight * 2).
aeCanvas clear: Color white.
Expand Down Expand Up @@ -514,6 +513,7 @@ AeCanvasTest >> renderZWJEmojiWithHarfbuzz [
AeCanvasTest >> renderZWJEmojiWithoutHarfbuzz [

| fontHeight aeCanvas cairoScaledFont cairoGlyphsArray |

self skip. "Randomly fails. We suspect we need a more recent version of cairo (it introduced improvements in this area)."

fontHeight := 21.
Expand Down
14 changes: 14 additions & 0 deletions src/Alexandrie-FreeType-Tests/AeFTLibraryResource.class.st
Expand Up @@ -13,6 +13,20 @@ Class {
#category : #'Alexandrie-FreeType-Tests-Resource'
}

{ #category : #'class initialization' }
AeFTLibraryResource class >> initialize [

SessionManager default registerUserClassNamed: self name
]

{ #category : #'system startup' }
AeFTLibraryResource class >> startUp: isImageStarting [
"Pharo is starting up. If this platform requires specific initialization, this is a great place to put it."

super startUp: isImageStarting.
isImageStarting ifTrue: [ self reset ]
]

{ #category : #accessing }
AeFTLibraryResource >> emojiFTFace [

Expand Down
Binary file modified tests/canvas/renderLigatureTextWithHarfbuzz.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/canvas/renderZWJEmojiWithHarfbuzz.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 410e8e0

Please sign in to comment.