emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compose-region docstring update (was: using glyphs by default in per


From: Kenichi Handa
Subject: Re: compose-region docstring update (was: using glyphs by default in perl-mode)
Date: Sun, 09 Jun 2013 08:45:48 -0400

In article <address@hidden>, Ted Zlatanov <address@hidden> writes:

KH> Yes.  And, here are simple examples:

KH> (insert (compose-string "." 0 1 '(?+ (tc . bc) ?o)))
KH> (insert (compose-string "." 0 1 '(?+ (cc . cc) ?o)))

> Thanks for the examples.  Can you explain them (I think I do, but your
> words would be welcome help)?  I will update the docstring once I
> understand this well enough.

I'll try to explain the first example.  In it,
compose-string has the optional 4th argument COMPONENTS.
The explanation of COMPONENTS (of type "list") is explained in
compose-region as below:

If it is a vector or list, it is a sequence of alternate characters and
composition rules, where (2N)th elements are characters and (2N+1)th
elements are composition rules to specify how to compose (2N+2)th
elements with previously composed N glyphs.

So, as for (?+ (tc . bc) ?o), ?+ is the first alternate
character, (tc . bc) is the first composition rule, ?o is
the second alternate character.  This means ?o is composed
with ?+ by the rule (tc . bc).

And the docstring of reference-point-alist explains the meaing of (tc
. bc).  According to the docstring, it means that ?o is compose with ?+
by aligning the top-center point of the glyphs of ?+ and the
bottom-center point of the glyph of ?o.  That yeilds a glyph whose
lower part is ?+ and upper part is ?o.

---
Kenichi Handa
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]