all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
To: "Adrian Robert" <adrian.b.robert@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Font backend font.c: "name" vs "family"
Date: Mon, 10 Mar 2008 10:04:55 +0900	[thread overview]
Message-ID: <E1JYWRj-0006Op-Tf@etlken.m17n.org> (raw)
In-Reply-To: <55f7df060803072248w9f554afvae9c2f0ec783bfa5@mail.gmail.com> (adrian.b.robert@gmail.com)

As I wrote, I'm not working of the overhaul of font related
code.  One of the change is to have font-spec in
lface[LFACE_FONT_INDEX] which will solve the problem you
wrote below.

Anyway, could you please give me some time to fix the
current labyrinth caused by the coexistence of legacy and
font-backend codes.

---
Kenichi Handa
handa@ni.aist.go.jp


In article <55f7df060803072248w9f554afvae9c2f0ec783bfa5@mail.gmail.com>, "Adrian Robert" <adrian.b.robert@gmail.com> writes:

> Hi,
> The function: font_open_by_name() gets called by font_load_for_face()
> with name=face->lface[LFACE_FONT_INDEX].  However, from 'spec =
> Ffont_spec (2, args);', it eventually goes to font_parse_fcname()
> which puts the information into the font_spec's 'family' slot.  But
> font 'family' and font 'name' are two different things.  E.g.,
> "Courier" could be the family, "Courier-Bold" (or "CourierBold") the
> 'name'.

> For example,

> nsfont: list for fontspec:
>     [ns nil Comic\ Sans\ MS nil iso10646-1 101 101 nil nil ((:name .
> "Comic Sans MS"))]
>     Returning 1 entities.
> nsfont: open size 12 of fontentity:
>     [ns apple Comic_Sans_MS Regular iso10646-1 99 100 100 0 nil nil nil]

>  ... The returned font has name "ComicSansMS" (no spaces), and gets
> used in some faces; later:

> nsfont: list for fontspec:
>     [ns nil ComicSansMS nil iso10646-1 101 101 nil nil ((:name .
> "ComicSansMS"))]

> The family "ComicSansMS" (no spaces) does not exist.  Is the driver
> supposed to pick up on the '(:name . "ComicSansMS")' part and ignore
> the family?  Or should load_font_for_face() or font_open_by_name() be
> changed?  It seems strange that loading by font name instead of by
> font spec should even be attempted in the font backend.

> Finally, a possibly related question: what are the uniqueness rules
> for creating new font-entities and opening fonts?  I am seeing
> driver->open() called multiple times for font specs with the same
> contents (but might be different lisp objects).  Should the driver (a)
> never create more than one instance of a given font entity, or (b)
> never create more than one 'struct font' object for a given system
> font, even if multiple entities exist that specify it?

> thanks,
> Adrian







      reply	other threads:[~2008-03-10  1:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-08  6:48 Font backend font.c: "name" vs "family" Adrian Robert
2008-03-10  1:04 ` Kenichi Handa [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=E1JYWRj-0006Op-Tf@etlken.m17n.org \
    --to=handa@m17n.org \
    --cc=adrian.b.robert@gmail.com \
    --cc=emacs-devel@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.