[Pharo-users] Can one use freetype fonts with Roassal?

Mark Miller mmille10 at comcast.net
Sat Sep 21 21:37:44 EDT 2019

I'm interested in using Pharo to do a math presentation, by which I mean I'd
like to show some algebra in process. I'm using a Mac (macOS Mojave), and
Pharo 7. I've settled upon Roassal2 as a good package to use for this, as
I'd like to arrange characters, and possibly do a little animation, and
maybe a little bit of effects with alpha settings. However, I'd like to show
the alphabetic characters in the traditional way for math (italicized), and
I'd like to be able to control the font size. Looking at the Roassal
examples, I can see how to control the font size, but not the font face.
I've been exploring what package Roassal uses for displaying fonts. It
appears to be FreeType. I have FreeType installed on macOS from Homebrew,
and I've copied a couple fonts into a "fonts" folder under my home directory
(as FreeType in Pharo seems to demand)--Times New Roman Italic, and Arial
Italic--but if I try to change the font face to any one of these, the font
face doesn't change, but I lose font sizing. Every character appears the
same size, even though the code is still trying to set the font height.

I'll use the Roassal exampleFontSize example to illustrate.

As-is, exampleFontSize displays this:


Once I try to change the font face to Times New Roman Italic, it looks like


I've tried changing it to use Arial Italic, but the font face still doesn't
change, and I lose all font sizing.

Any ideas on why this is happening?


Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

More information about the Pharo-users mailing list