From 76e8cabbabe49c1baec59562676dca035e7f6482 Mon Sep 17 00:00:00 2001 From: Martin Dias Date: Wed, 29 Nov 2023 23:55:38 -0300 Subject: [PATCH] Add missing printing protocol in AeHbLanguage --- src/Alexandrie-Harfbuzz/AeHbLanguage.class.st | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/Alexandrie-Harfbuzz/AeHbLanguage.class.st b/src/Alexandrie-Harfbuzz/AeHbLanguage.class.st index 1d23aff..8d37c3d 100644 --- a/src/Alexandrie-Harfbuzz/AeHbLanguage.class.st +++ b/src/Alexandrie-Harfbuzz/AeHbLanguage.class.st @@ -66,3 +66,24 @@ AeHbLanguage class >> startUp: isResuming [ isResuming ifTrue: [ self resetKnownInstances ] ] + +{ #category : 'printing' } +AeHbLanguage >> printOn: aStream [ + + super printOn: aStream. + aStream + nextPut: $(; + print: self toString; + nextPut: $) +] + +{ #category : 'converting' } +AeHbLanguage >> toString [ + "Answer a string representation. + + See: https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-language-to-string" + + ^ self ffiCall: #( + const char * hb_language_to_string ( self ) + ) +]