Skip to content
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

Fix property sheet error from not finding labelMorph font #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

doublec
Copy link
Collaborator

@doublec doublec commented Sep 20, 2013

When getting the property sheet of a labelMorph that is using a font
that doesn't exist in the 'x11Globals scalableFont' list an error
occurs and the property sheet can't display.

The scalableFont list has an undefinedSelector method which handles
direct requests for fonts that don't exist and returns 'times'.
Unfortunately the enumeration of the fonts that the property sheet
uses just lists the selectors of 'fontFamily' so treats the
undefinedSelect method as a font name and hence the default handlin
never occurs.

This fix taken here adds a 'defaultFont' to the scalableFont list.
This returns 'times', the same as the undefined selector. The
property sheet looks this up if the actual font name can't be found.

I also remove the undefined selector slot name and a couple of other
non-font slots that were missed in the x11Globals fontFamily method.

See issue 4 for other details. I didn't relate this to issue 4 as that issue may be a Mac OS X backend problem.

@doublec
Copy link
Collaborator Author

doublec commented Sep 21, 2013

Added a commit that fixes issue #4 on Mac OS X.

When getting the property sheet of a labelMorph that is using a font
that doesn't exist in the 'x11Globals scalableFont' list an error
occurs and the property sheet can't display.

The scalableFont list has an undefinedSelector method which handles
direct requests for fonts that don't exist and returns 'times'.
Unfortunately the enumeration of the fonts that the property sheet
uses just lists the selectors of 'fontFamily' so treats the
undefinedSelect method as a font name and hence the default handlin
never occurs.

This fix taken here adds a 'defaultFont' to the scalableFont list.
This returns 'times', the same as the undefined selector. The
property sheet looks this up if the actual font name can't be found.

I also remove the undefined selector slot name and a couple of other
non-font slots that were missed in the x11Globals fontFamily method.
This fixes russellallen#4. On Mac OS X the 'scalableFont' property does not
exist in the windowCanvas for quartz. This adds it by falling
back on the X11 implementation.

This commit also adds a 'verdana' font entry to the list of X11
fonts allow Verdana to display and be selected in the property
sheet. On Mac OS X this correctly results in Verdana displaying.
On Linux without Verdana it falls back to the default, Times.
@doublec doublec force-pushed the label_property_sheet branch from 07a8704 to 375e4b2 Compare October 2, 2014 23:18
@doublec
Copy link
Collaborator Author

doublec commented Oct 2, 2014

Rebased on top of master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant