From: Kenichi Handa <handa@m17n.org>
To: Jason Rumney <jasonr@gnu.org>
Cc: adrian.b.robert@gmail.com, emacs-devel@gnu.org
Subject: Re: font-backend mechanism on Windows and Mac?
Date: Sat, 15 Sep 2007 10:31:06 +0900 [thread overview]
Message-ID: <E1IWMV0-00044z-4I@etlken.m17n.org> (raw)
In-Reply-To: <46EB1FB5.40603@gnu.org> (message from Jason Rumney on Sat, 15 Sep 2007 00:56:37 +0100)
In article <46EB1FB5.40603@gnu.org>, Jason Rumney <jasonr@gnu.org> writes:
> Adrian Robert wrote:
> > Another possibility is the metrics implementation. In text_extents()
> > the W32 and Xft impls query the font itself for the metrics every
> > time. With Xft this may be fast if the font is client-side (and it
> > does it for the whole string, not each char), but possibly under
> > Windows it is not. In Cocoa nsfont.m metrics are cached in blocks of
> > 256 chars to deal with this.
> This might make a difference, the old Windows code used to cache the
> metrics of ASCII characters for each font.
> > font.c. (But drivers _should_ do a full-string determination like
> > xftfont.c does if they can, so they wouldn't need it.)
> >
> I think the lack of comments for the font backend has led us to
> implement this incorrectly.
Which part of comment do you mean?
> Actually, when text_extents is called with a metrics argument, nglyphs
> is always 1, so there is no need to loop over all the characters, and
> there is only one metric to fill in, not an array of them.
In most cases, text_extents is called for one glyph by one.
That is because the original display engine calls
x_produce_glyphs for one character by one. To improve it,
we will need a very big change in the core part of the
display engine.
But, x_compute_glyph_string_overhangs will call text_extents
with multiple glyphs.
> In the case
> where metrics is NULL, the Windows version does do a full string
> determination, but it has to convert the unsigned array of characters to
> a short array for the Windows API functions.
??? text_extents should always be called with non-NULL
metrics arg.
---
Kenichi Handa
handa@m17n.org
next prev parent reply other threads:[~2007-09-15 1:31 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-10 2:39 font-backend mechanism on Windows and Mac? Kenichi Handa
2007-09-10 3:04 ` YAMAMOTO Mitsuharu
2007-09-10 3:12 ` Kenichi Handa
2007-09-10 3:47 ` YAMAMOTO Mitsuharu
2007-09-10 4:37 ` Kenichi Handa
2007-09-10 12:39 ` Adrian Robert
2007-09-10 13:09 ` Kenichi Handa
2007-09-11 21:04 ` Adrian Robert
2007-09-11 21:21 ` Stefan Monnier
2007-09-12 13:51 ` Adrian Robert
2007-09-10 7:42 ` Jason Rumney
2007-09-10 13:13 ` Kenichi Handa
2007-09-10 13:45 ` Jason Rumney
2007-09-10 13:49 ` Jason Rumney
2007-09-12 6:43 ` Kenichi Handa
2007-09-13 11:55 ` Kenichi Handa
2007-09-13 13:41 ` Jason Rumney
2007-09-14 12:46 ` Kenichi Handa
2007-09-14 13:58 ` Jason Rumney
2007-09-14 23:10 ` Adrian Robert
2007-09-14 23:56 ` Jason Rumney
2007-09-15 1:31 ` Kenichi Handa [this message]
2007-09-15 7:37 ` Jason Rumney
2007-09-16 10:29 ` Kenichi Handa
2007-09-16 11:01 ` Jason Rumney
2007-09-17 2:16 ` Kenichi Handa
2007-09-15 2:24 ` Kenichi Handa
2007-09-13 15:53 ` Adrian Robert
2007-09-13 16:23 ` Jason Rumney
2007-09-14 1:19 ` Kenichi Handa
2007-09-14 13:52 ` Adrian Robert
2007-09-14 14:55 ` YAMAMOTO Mitsuharu
2007-09-14 15:02 ` Jason Rumney
2007-09-14 15:36 ` YAMAMOTO Mitsuharu
2007-09-15 0:05 ` Adrian Robert
2007-09-15 1:44 ` YAMAMOTO Mitsuharu
2007-09-15 13:21 ` Adrian Robert
2007-09-15 13:43 ` YAMAMOTO Mitsuharu
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=E1IWMV0-00044z-4I@etlken.m17n.org \
--to=handa@m17n.org \
--cc=adrian.b.robert@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=jasonr@gnu.org \
/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.