-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add support for anti-aliased fonts in user interface #12
Comments
I will have a PR up soon that I could use your feedback on. Here are some resources for myself which helped me understand what this is: http://www.motifdeveloper.com/tips/tip2.html I'll also add the Motif XFT PDF since it's only available on internet archive (and small): |
This is a great suggestion. What do you think about the solution in PR #14 ? |
I think the solution is fine. As XFT was added to Motif in the sunset of its active development, the documentation is very scarce. You have collected the right bits of documentation. |
With that information I would probably prefer to make the default aliased, and then provide the config file for those interested in changing it to anti-aliased (at least until the patch is included). Am I correctly reading that the report has gone untouched for over a year? |
The "default" XFT rendering with Motif on MacOS is slow, but only for drawing labels. The rest of the software speed is normal. So it is not that dramatic. But opening menus is not snappy, and scrolling long lists is really slow. I think your program will not be terribly affected with XFT slowness, even if you use unpatched Motif. Try it for yourself and see. As for the fact that my patch was not integrated and nobody bothered to reply or check it - it just shows that active Motif development has stopped. I have bugged ICS from time to time with pleas to fix some obvious bugs, which were reported with solution in bugzilla. A couple of times they did it, but now they don't even remove obvious spam from Bugzilla, which renders it almost useless. Bugzilla was also down for months and nobody seemed to bother. |
@dpeterc I submitted a note to ICS with a link to your issue on bugzilla for this. I am hoping that more than one of us can get something to happen. |
@dpeterc Here is what I got. My reading of this is "we don't like the way X11 was implemented on mac", which may be true, but I don't think is a good response. Frequent round trips to the Xserver are bad, even if they are worse on mac. Am I wrong? I am happy to reply to this. Is there actually a bug we could go after in XQuartz? One approach to getting the fix available for users is to apply the patch in the motif hombrew formula. Is this of interest to you? |
@justinmeiners thank you Justin, for pushing for inclusion of this bug fix. I will just point to the parts of ISC answers which are not correct in my opinion. So it is still quite relevant, since Motif is one of the old toolkits, which still work perfectly over network, and people do use it that way. A lot of older scientific software is still Motif based, and MacOS usage in academia is high, now that classical Unix workstations are thing of the past. RedHat has created a similar patch AND IT IS ALREADY INCLUDED in the latest Motif. Problem is, that it was not applied to all the cases, so it shows as slow performance on XmList widget with XFT fonts. Hence slow opening of Menus, or slow scrolling of textual lists (on MacOS or remote connection). "X's design requires the clients and server to operate separately, and device independence and the separation of client and server incur overhead. Most of the overhead comes from network round-trip delay time between client and server (latency) rather than from the protocol itself: the best solutions to performance issues depend on efficient application design." And if library (Motif) does this mistake, then even carefully written Motif applications will have poor performance. The corrections consists in simply caching the background color from last drawing of label (thus avoiding XQueryColor and round-trip), so repetitive drawing of XFT text on the same background color (which is the most typical case) becomes fast. |
@dpeterc I will relay the message. :) |
@dpeterc bugzilla on motif zone is dead. Can you post the patch here? |
Download Motif from Sourceforge, edit XmRenderT.c and replace functions _XmXftDrawString2 and _XmXftDrawString.
I also attach the complete replacement file, which contains some other small improvements and formatting fixes. |
@dpeterc thanks. I'm trying to advocate for this again, either in motif or a patch for homebrew. |
@justinmeiners I hope you will be successful. |
I was thinking about this today. Here are notes for historical purposes. This is a page about the patch made by Red hat to address the same XFT issue: https://access.redhat.com/errata/RHBA-2013:1484 A search bring up a few RPM archives containing motif patch files. Here are two such repositories: This is the relevant patch: I'll also include a zip of all the other patches from the RPM: Here is the changelog from sites above that describe what each patch does:
|
Motif does support anti-aliased fonts using XFT.
Current default usage of classic-colors does not look as well as it could, and that might deter some users.
If you start the program with the following options, you will have the user interface in anti-aliased fonts.
classic-colors -xrm "*renderTable: rt" -xrm "rtfontType: FONT_IS_XFT" -xrm "rtfontName: Sans" -xrm "rtfontSize: 10"
Program should do this internally by default, or offer a script for starting the binary with these options.
The user could then edit the script to change font typeface and size.
Ultimately, the program should read some system default font or offer user interface for selection of default user interface font, but at this early stage, it is probably an overkill.
For XFT font selector, check the source of xnedit
https://sourceforge.net/projects/xnedit/
Preferences > Text fonts > Browse
The text was updated successfully, but these errors were encountered: