diff --git a/src/Alexandrie-Harfbuzz/AeHbBuffer.class.st b/src/Alexandrie-Harfbuzz/AeHbBuffer.class.st index 4ef138f..cb6e7f2 100644 --- a/src/Alexandrie-Harfbuzz/AeHbBuffer.class.st +++ b/src/Alexandrie-Harfbuzz/AeHbBuffer.class.st @@ -97,18 +97,16 @@ AeHbBuffer >> cairoGlyphArray [ length := self length. length = 0 ifTrue: [ ^ AeCairoGlyphArray newOf: 0 ]. - infos := FFIExternalArray + infos := AeHbGlyphInfoArray fromHandle: (self getGlyphInfosInto: ExternalAddress null) - type: AeHbGlyphInfo size: length. - positions := FFIExternalArray + positions := AeHbGlyphPositionArray fromHandle: (self getGlyphPositionsInto: ExternalAddress null) - type: AeHbGlyphPosition size: length. cairoGlyphsArray := AeCairoGlyphArray newOf: length. - currentX := 0. - currentY := 0. + currentX := 0.0. + currentY := 0.0. cairoGlyphsArray doWithIndex: [ :each :index | | position | position := positions at: index. diff --git a/src/Alexandrie-Harfbuzz/AeHbGlyphInfoArray.class.st b/src/Alexandrie-Harfbuzz/AeHbGlyphInfoArray.class.st new file mode 100644 index 0000000..352648f --- /dev/null +++ b/src/Alexandrie-Harfbuzz/AeHbGlyphInfoArray.class.st @@ -0,0 +1,14 @@ +" +I'm an array of `AeHbGlyphInfo`. +" +Class { + #name : #AeHbGlyphInfoArray, + #superclass : #AeFFIExternalArray, + #category : #'Alexandrie-Harfbuzz-Structures' +} + +{ #category : #'class initialization' } +AeHbGlyphInfoArray class >> initialize [ + + resolvedType := self resolveType: AeHbGlyphInfo +] diff --git a/src/Alexandrie-Harfbuzz/AeHbGlyphPositionArray.class.st b/src/Alexandrie-Harfbuzz/AeHbGlyphPositionArray.class.st new file mode 100644 index 0000000..e83fc40 --- /dev/null +++ b/src/Alexandrie-Harfbuzz/AeHbGlyphPositionArray.class.st @@ -0,0 +1,14 @@ +" +I'm an array of `AeHbGlyphPosition`. +" +Class { + #name : #AeHbGlyphPositionArray, + #superclass : #AeFFIExternalArray, + #category : #'Alexandrie-Harfbuzz-Structures' +} + +{ #category : #'class initialization' } +AeHbGlyphPositionArray class >> initialize [ + + resolvedType := self resolveType: AeHbGlyphPosition +]