all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
To: Kenichi Handa <handa@m17n.org>
Cc: adrian.b.robert@gmail.com, emacs-devel@gnu.org
Subject: Re: font selection mechanism (e.g., Japanese)
Date: Tue, 2 Feb 2010 09:36:54 -0500	[thread overview]
Message-ID: <8DE939F2-1B72-44E9-9AF1-615E47BBB23B@gmail.com> (raw)
In-Reply-To: <tl7hbpzvosn.fsf@m17n.org>

[-- Attachment #1: Type: text/plain, Size: 2615 bytes --]

On Feb 2, 2010, at 6:51 AM, Kenichi Handa wrote:

> Hmmm, then NS's font-backend should be improved.  Could
> someone working on NS port please port take a look at this
> problem.

FWIW, I have experimented with other variants of ns_findfonts() (for "match", not for "list"), but ultimately found that it's mostly "list" that is called while the code in font.c iteratively reduces that constraints.

I also found one font that is returned with the first batch ("Osaka"), which has sufficient (.95) coverage for the 'han' script.  However, it is still not chosen, and I assume that this is because there is not sufficient information present about the font weight.  That's the NS font driver's fault.  I have filed a bug report about this; of course I've tried to provide the weight information (with odd results - not sure why).   Similarly, we don't get the "ADSTYLE" information about fonts either, so that the alternative font can't be chosen according to that either.   Someone with better knowledge of nsfont.m might be able to debug this.

>> The problem I have now is to get it to choose different fonts within  
>> the same script in cases where a low-coverage font does not provide a  
>> glyph.  The above threshold change makes things work better in  
>> practice, but the HELLO file shows serious regressions.
> 
> Regression in which part?  Only for Han scripts, or for all scripts?

For more than han.  What I have since noticed is that we're unable or unwilling to select font foo for a given script, but, when foo doesn't have glyphs for all needed characters, switch to another font bar for the same script for those characters.  Is that correct?

>> Where in the code would one get it to choose a different font for a  
>> character if the current font can't display it?  This is by-character  
>> selection, not by-script.
> 
> The function fontset_find_font in fontset.c does that job.

OK, I'll look into that.  I assume it does that automatically, i.e. without explicit specifications in a fontset?
(All I'm talking about here is automatic selection.  It's clear that a fontset can be constructed manually.)

> By the way, I locally have a code that respect the order of
> fonts returned by font_driver->list () in font sorting.  I'm
> going to commit it for post 23.2 branch.  Then, each driver
> can return fonts in their preferred order.

But then the driver also needs an argument such as a full font spec for the target font, so that the order can be determined by similarity.  Right now, the only information it has is a set of hard constraints.  

- D

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 203 bytes --]

      reply	other threads:[~2010-02-02 14:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-29 15:14 font selection mechanism (e.g., Japanese) David Reitter
2010-02-02 11:51 ` Kenichi Handa
2010-02-02 14:36   ` David Reitter [this message]

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=8DE939F2-1B72-44E9-9AF1-615E47BBB23B@gmail.com \
    --to=david.reitter@gmail.com \
    --cc=adrian.b.robert@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=handa@m17n.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.