unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jason Rumney <jasonr@gnu.org>
To: Kenichi Handa <handa@m17n.org>
Cc: schwab@suse.de, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Problem with narrow vs condensed fonts
Date: Thu, 28 Feb 2008 11:17:18 +0000	[thread overview]
Message-ID: <47C6983E.50503@gnu.org> (raw)
In-Reply-To: <47C3FF62.1080003@gnu.org>

Jason Rumney wrote:
> Kenichi Handa wrote:
>> By the way, I think having different numeric values for
>> Windows is not right.  The function font-spec accepts also
>> numeric values for style parameters (:weight, :slant,
>> :width).  So, it is better that the numeric values are
>> consistent in all versions of Emacs.  Is it difficult (or
>> time consuming) to map windows numeric values to what
>> specified in font-XXX-table in w32_enumfont_pattern_entity?
>>   
>
> It is probably quite difficult and error prone, as we would be mapping 
> a larger range (100-900 for weight on windows) onto a smaller range 
> (0-210), and the mapping appears to be non-linear. Although in 
> practice, most fonts probably use the fixed values currently defined 
> in font-weight-table, I don't think it is guaranteed.
>
> I don't think users will be surprised if numeric weights are defined 
> as backend specific. Perhaps we shouldn't even allow them for the x 
> backend, since they are not supported natively.

I think it would be better if font-spec allowed either symbols or 
integers for weight, slant and swidth. Only certain symbols 
(medium/normal/regular, bold, italic, roman) are guaranteed to be 
supported, other symbols and integer values are implementation specific 
and should not be used internally by Emacs, or by Lisp packages, but are 
available to end users to fine tune their face customizations etc.

The x backend would not recognize integer weights, and would convert 
symbols for inclusion in xflds by symbol-name.

The xft, Windows and other backends would have their own tables for 
converting symbols to numeric values where numeric values are used 
internally by the implementation.


I thought the intention of the new font backend was to abstract out the 
differences between font APIs, but by imposing fontconfig definitions of 
numeric weight, slant and swidth, we have only moved from a XFLD centric 
font implementation to a fontconfig centric one.






  reply	other threads:[~2008-02-28 11:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-18 22:21 Problem with narrow vs condensed fonts Stefan Monnier
2008-02-18 23:05 ` Lennart Borgman (gmail)
2008-02-24 21:32 ` Andreas Schwab
2008-02-25  2:09   ` Stefan Monnier
2008-02-25  6:23     ` Kenichi Handa
2008-02-25  8:27       ` Jason Rumney
2008-02-25 11:24         ` Kenichi Handa
2008-02-25 11:35           ` Jason Rumney
2008-02-25 10:25       ` Andreas Schwab
2008-02-25 15:45       ` Stefan Monnier
2008-02-26  1:54         ` Kenichi Handa
2008-02-26  2:23           ` Stefan Monnier
2008-02-26  3:10             ` Kenichi Handa
2008-02-26  4:48               ` Stefan Monnier
2008-02-26  4:58                 ` Stefan Monnier
2008-02-26  9:45                   ` Jason Rumney
2008-02-26 11:18                     ` Kenichi Handa
2008-02-26 12:00                       ` Jason Rumney
2008-02-28 11:17                         ` Jason Rumney [this message]
2008-02-28 12:05                           ` Kenichi Handa
  -- strict thread matches above, loose matches on Subject: below --
2008-02-25  9:16 Angelo Graziosi

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=47C6983E.50503@gnu.org \
    --to=jasonr@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=handa@m17n.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=schwab@suse.de \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).