Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug rendering zero width joiner unicode sequences #58

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Alexandrie-Canvas-Tests/AeCanvasTest.class.st
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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.