lilypond-devel
[Top][All Lists]
Advanced

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

Re: utf-8-string


From: Patrick McCarty
Subject: Re: utf-8-string
Date: Tue, 7 Feb 2012 23:12:10 -0800

On Tue, Feb 7, 2012 at 7:19 PM, Patrick McCarty <address@hidden> wrote:
> On Mon, Feb 6, 2012 at 4:55 AM, address@hidden
> <address@hidden> wrote:
>> Hey all,
>>
>> I see a shortcut for utf-8-strings in pango-font.cc.  This is
>> all well and good except that it is hard to do box
>> approximations on these guys (it'd require adding lots of code).
>> How mad would LilyPond be if I just deleted all of the
>> utf-8-string business?  I don't think it'd change the visual
>> output...it'd just get rid of a shortcut.  Does anyone have any
>> justification for keeping this shortcut?
>
> utf-8-string is absolutely critical for the SVG backend (not sure
> about the socket backend)...

To follow up, I just noticed your patch that reworks vertical
skylines, and I assume that your concern about utf-8-string is
related to this.  Let me know if I'm wrong.

For now, here's an idea:

- Introduce a new argument to 'utf-8-string' that exposes vertical
  extent information for each glyph in the string.  It could be a
  simple list of pairs.  For example:

  (utf-8-string "Century Schoolbook L Bold 16"
                "test"
                '((0.0 . 1)
                  (0.0 . 0.6)
                  (0.0 . 0.6)
                  (0.0 . 1)))

  The number of pairs in the list will match the length of the
  (UTF-8) string, of course.  I don't think the glyph width,
  offsets, and characters are really needed in the list, unless
  you can think of a use for them in your vertical skyline
  calculations.


In the long term, it may be better to unify the stencil
expressions used for text, but as it stands, I think it would be
easier to add information to the existing stencil expressions (as
you are doing for 'glyph-string' in your patchset).

Regards,
Patrick



reply via email to

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