all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jason Rumney <jasonr@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "Óscar Fuentes" <ofv@wanadoo.es>, emacs-devel@gnu.org
Subject: Re: Where is a character presence tested in a font?
Date: Mon, 16 Jul 2012 10:46:56 +0800	[thread overview]
Message-ID: <877gu4qv6n.fsf@gnu.org> (raw)
In-Reply-To: <83d33xatal.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 15 Jul 2012 19:22:10 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Óscar Fuentes <ofv@wanadoo.es>
>> Date: Sun, 15 Jul 2012 17:44:36 +0200
>> 
>> Could someone point me to the source code (or API name) where Emacs
>> on MS Windows tests for the presence of a given character on a font?
>
> Search for uses of font_has_char.  The Windows implementation of this
> just returns -1, but the code that calls it should then use some
> alternative strategy (which includes opening the font, AFAIU) to
> arrive at the conclusion.

The alternative strategy is to call encode_char. I notice that while the
uniscribe backend's implementation of encode_char does lookup the code
point for the font, the w32 backend just returns the unicode code point
as long as it is not completely outside the range covered by the font.

As Emacs has since been modified to report the backend and codepoint,
perhaps C-u C-x = now will tell whether the original diagnosis was
correct, or for that character we are falling back on the w32 font
backend.



  reply	other threads:[~2012-07-16  2:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-15 15:44 Where is a character presence tested in a font? Óscar Fuentes
2012-07-15 16:22 ` Eli Zaretskii
2012-07-16  2:46   ` Jason Rumney [this message]
2012-07-15 18:36 ` Štěpán Němec
2012-07-16  2:49   ` Jason Rumney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877gu4qv6n.fsf@gnu.org \
    --to=jasonr@gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.