On 2014/07/31 20:40:40, janek wrote:
from description:
> Furthermore, it implements per-font scaling (e.g., to match the
x-heights
> of different fonts used in the document).

This is very nice!  Please pardon a stupid question, but i failed to
find which
place in the code is responsible for this.  Could you give me a
pointer?

The user interface is simply an optional argument (default 1) in the
font-spec-list.  Internally, it works as follows:  Each Pango font
description carries a size value.  Not sure how to call it - design
size, preferred size?  Anyway, the string given by the user as a font
specification is appended by some size which is computed as
  12pt * global-factor [last arg of make-[expert/pango]-font-tree] *
per-font-factor [optional arg in font-spec-list]
The effect is a different output scale for each font.

> No attempt has been made for
> auto-detection of the x-height of a font; I guess that would require
> delving into the C++-Pango parts, which is above my threshold.

That's something i'm interested in.  Most probably i won't have enough
time to
tackle it soon, but someday i'd really like to implement such a
feature!

I have no idea how hard or easy this is.  An interesting side effect is
that probably the list of available (OpenType) font features like expert
ligatures, old style figures etc. can easily be accessed at the same
time, and I hope that it is possible to make them available to the user
as well.  But that's much more involved than just make-expert-font-tree.

https://codereview.appspot.com/108700043/

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to