-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create system preferences for AeCanvas options #31
Comments
Same for default fonts on Font manager, I think. |
The following method shows the need of a system setting, so SourceSansPro and SourceCodePro won't be hardcoded anymore. Now... the family names are easy to be added as preference, but slant, weight and stretch present several options. Keep hardcoded normal-normal-normal is the simplest option, of course. I think the best is to offer a list of all available fonts with combinations to the user, the same that is shown by the font manager's inspector. So, the user would first scan font directories, if needed, and finally can select from that list. AeFontManager>>
globalInstance
^ globalInstance ifNil: [
| aFace |
globalInstance := self new
scanEmbeddedFonts;
yourself.
aFace := globalInstance
detectFamilyName: AeSourceSansPro_Regular familyName
slant: AeFontSlant normal
weight: AeFontWeight normal
stretch: AeFontStretch normal
ifNone: [ self error: 'Shouldn''t happen' ].
globalInstance defaultFace: aFace.
aFace := globalInstance
detectFamilyName: AeSourceCodePro_Regular familyName
slant: AeFontSlant normal
weight: AeFontWeight normal
stretch: AeFontStretch normal
ifNone: [ self error: 'Shouldn''t happen' ].
globalInstance defaultCodeFace: aFace.
globalInstance ] |
In other side (this is another issue but related), the font manager right now doesn't remember what directories where scan from disk. This means that after the image is opened, from the new session can't automatically rescan the fonts from the previous session (before save&close, for example). We would need that directories to scan and other font manager parameters are stored as a system setting. (See: pharo-graphics/Bloc#672). |
For antialiasing and other options that are now set on initialization, only depending on the device scale.
The text was updated successfully, but these errors were encountered: