Bloc icon indicating copy to clipboard operation
Bloc copied to clipboard

font name revert to default after image restart and won't use name provided.

Open rvillemeur opened this issue 1 year ago • 5 comments

Using this script to display Emoji from 'Noto Color Emoji'. The first time, you get a grid of Emoji (hopefully in color). image

Save and close the image. Reopen it and re-execute the script, you'll get image

It look like it will default to Source Sans Pro (the default one in Bloc)

image

image

Behavior reproduced using Pharo 12, Windows 11 or Linux Fedora 41

| container |
container := BlElement new
				 border: (BlBorder paint: Color red width: 1);
				 background: (Color white);
				 layout: BlFlowLayout horizontal;
				 constraintsDo: [ :c |
					 c horizontal matchParent.
					 c vertical fitContent ].

"Noto Color Emoji has 2668 different glyph"

16r1F600 to: 16r1F64F do: [ :each |
	| elt |
	elt := BlTextElement text: ((Unicode value: each) asRopedText
					fontSize: 40;
					fontName: 'Noto Color Emoji').
	elt
		padding: (BlInsets all: 5);
		border: (BlBorder paint: Color black width: 1).

	container addChild: elt ].

"container openInNewSpace."
^ container

Reseting and scanning for system font doesn't change the behavior image

rvillemeur avatar Dec 17 '24 15:12 rvillemeur