[Cuis-dev] Unicode in morphs
Juan Vuletich
juan at cuis.st
Thu Aug 15 06:26:48 PDT 2024
On 8/14/2024 10:17 PM, Mark Volkmann via Cuis-dev wrote:
> On Wed, Aug 14, 2024 at 9:39 AM <ken.dickey at whidbey.com
> <mailto:ken.dickey at whidbey.com>> wrote:
>
> On 2024-08-13 17:16, Mark Volkmann via Cuis-dev wrote:
>
> > Should I be able to use Unicode characters in morphs like this?
> >
> > (LabelMorph contents: '🗑') openInHand.
> >
> > When I paste the trash can Unicode character into a Workspace, it
> > appears as a rectangle.
> > I believe that means it doesn't recognize the character.
> > It also renders as a rectangle instead of the trash can character.
>
> The default font lacks many glyphs -- e.g. for Chinese and apparently
> for trash cans.
>
> Try importing and setting a TrueType Font which has this glyph.
>
>
> Thanks! I found that the "Kurinto Sans" font contains the wastebasket
> Unicode character and I installed it.
> The attached screenshot shows an example.
>
> I want to use that font in a PluggableButtonMorph.
> But here is the font: method in that class:
>
> font: someFont
> PopUpMenu inform: 'You can''t set this'
>
> Yikes! I wonder why we're not allowed to set the font for that kind of
> morph.
>
> --
> R. Mark Volkmann
> Object Computing, Inc.
You can. World / New morph... / From Alphabetical List /
PluggableButtonMorph. Now open a halo on one of the inner
PluggableButtonMorphs. Open an inspector. In the evaluation pane, evaluate:
self roundButtonStyle: false.
(FontFamily promptUser: self fontToUse familyName) ifNotNil: [
:fontFamily |
self label: '🗑' font: (fontFamily atPointSize: self fontToUse
pointSize) ].
and select 'Kurinto Sans'.
Works nicely.
HTH,
--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240815/05fac7ca/attachment.htm>
More information about the Cuis-dev
mailing list