How do I get Arabic font?

X11: how do I get the font I want?

  • My program wants to load a monospace font with this command: font_info = XLoadQueryFont(dpy, "-*-*-medium-r-*-*-12-*-*-*-m-*-iso8859-1"); The font it ends up loading is -apple-monaco-medium-r-normal--12-87-100-100-m-90-iso8859-1 How can I get my local machine to realize that the "best" font to use is -urw-nimbus mono l-medium-r-normal--12-87-100-100-m-90-iso8859-1 I don't want to name a specific font in my program, because I can't guarantee that my computer will have it. I want my computer to know that this is the best font to use. Is this possible?

  • Answer:

    Create your own priority list and you can leave that as a fallback. Try loading nimbus font first. font_info = XLoadQueryFont(dpy, "-*-nimbus*-medium-r-*-*-12-*-*-*-m-*-iso8859-1"); if (!font_info) { fprintf(stderr, "XLoadQueryFont: failed to load nimbus font, looking for a fallback font\n"); font_info = XLoadQueryFont(dpy, "-*-*-medium-r-*-*-12-*-*-*-m-*-iso8859-1"); } if (!font_info) fprintf(stderr, "XLoadQueryFont: failed to load a font\n");

hymie at Stack Overflow Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.