moosetechnology / Moose

MOOSE - Platform for software and data analysis.
https://moosetechnology.github.io/moose-wiki
MIT License
136 stars 34 forks source link

Improvement of TRLableShape >> defaultFamilyFontName ? #1219

Closed bergel closed 7 years ago

bergel commented 7 years ago

A little suggestion by @LiangBing#5581

TRLableShape >> defaultFamilyFontName
    "Default Family font"
    | fontList |
    fontList := TRPlatform current fontListStrings.
    fontList ifEmpty: [ ^ TRPlatform current defaultFont familyName ].

+    (fontList includes: StandardFonts listFont familyName ) ifTrue: [ ^ StandardFonts listFont familyName ].

    (fontList includes: 'Source Sans Pro') ifTrue: [ ^ 'Source Sans Pro' ].
    (fontList includes: 'DejaVu Sans') ifTrue: [ ^ 'DejaVu Sans' ].

    ^ TRPlatform current defaultFont familyName

to keep Setting accordance.

However, we need to make sure this method is compatible with VisualWorks. What would be the solution ?

akevalion commented 7 years ago

I have updated Roassal-Trachel in both, Pharo and Visualworks, with this code.