all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
To: James Cloos <cloos@jhcloos.com>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Interesting combining character issue
Date: Fri, 05 Dec 2008 13:55:34 +0900	[thread overview]
Message-ID: <E1L8Sj0-00016p-5t@etlken.m17n.org> (raw)
In-Reply-To: <m33ah483pv.fsf@lugabout.jhcloos.org> (message from James Cloos on Thu, 04 Dec 2008 08:33:09 -0500)

In article <m33ah483pv.fsf@lugabout.jhcloos.org>, James Cloos <cloos@jhcloos.com> writes:

Kenichi> What is shown when you move point on the first cahracter of
Kenichi> that sequence (U+ 04E8) and type C-u C-x =?
[...]
> Composed with the following character(s) "̄" using this font:
>   xft:-unknown-DejaVu Sans Mono-normal-normal-normal-*-14-*-*-*-m-0-iso10646-1
> by these glyphs:
>   [0 1 1256 978 8 0 8 11 1 nil]
>   [0 1 772 647 -9 2 6 10 -9 [0 0 -9]]

That is different from my case.  I got this with the same font:

Composed with the following character(s) "̄" using this font:
  xft:-unknown-DejaVu Sans Mono-normal-normal-normal-*-14-*-*-*-m-0-iso10646-1
by these glyphs:
  [0 1 1256 978 8 0 8 11 1 nil]
  [0 1 772 647 8 2 6 10 -9 [-8 -3 0]]

The last vector is the information about the glyph of U+304
(COMBINING MACRON).  Yours says that the glyph width is -9
(5th element), which is a little bit strange.

Please show me these info:
% freetype-config --version
% libotf-config --version
% m17n-config --version

Mine are 9.18.3, 0.9.8, 1.5.3 respectively.

And, please run the attached program as this:
% fttest .../DejaVuSansMono.ttf 647

I got this:

width=8, lbearing=2, rbearing=6, acsent=10, descent=-9

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

----fttest.c--------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>

#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_TRUETYPE_TABLES_H

int
main (int argc, char **argv)
{
  FT_Library library;
  FT_Face ft_face;
  FT_Glyph_Metrics *m;

  if (argc < 3)
    {
      printf ("Usage: fttest FONTFILE CHAR\n");
      exit (1);
    }

  FT_Init_FreeType (&library);
  FT_New_Face (library, argv[1], 0, &ft_face);
  FT_Set_Pixel_Sizes (ft_face, 14, 14);
  FT_Load_Glyph (ft_face, atoi (argv[2]), FT_LOAD_DEFAULT);
  m = &ft_face->glyph->metrics;
  printf ("width=%d, lbearing=%d, rbearing=%d, acsent=%d, descent=%d\n",
	  (int) (m->horiAdvance >> 6), (int) (m->horiBearingX >> 6),
	  (int) ((m->horiBearingX + m->width) >> 6),
	  (int) (m->horiBearingY >> 6),
	  (int) ((m->height - m->horiBearingY) >> 6));
  exit (0);
}




  reply	other threads:[~2008-12-05  4:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-16 17:48 Interesting combining character issue James Cloos
2008-11-16 19:06 ` Stefan Monnier
2008-12-02 15:15   ` James Cloos
2008-12-04  1:49     ` Kenichi Handa
2008-12-04 10:12       ` James Cloos
2008-12-04 12:45         ` Kenichi Handa
2008-12-04 13:33           ` James Cloos
2008-12-05  4:55             ` Kenichi Handa [this message]
2008-12-05  9:14               ` James Cloos
2008-12-05 12:30                 ` Kenichi Handa
2008-12-05 20:48                   ` James Cloos
2008-12-06  1:14                   ` James Cloos
2008-12-07  8:51                     ` Kenichi Handa

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=E1L8Sj0-00016p-5t@etlken.m17n.org \
    --to=handa@m17n.org \
    --cc=cloos@jhcloos.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.