lilypond-devel
[Top][All Lists]

## Re: pango, first try

 From: Werner LEMBERG Subject: Re: pango, first try Date: Fri, 03 Dec 2004 12:39:03 +0100 (CET)

> I had a look at using Pango for typesetting text. See the attached
> program.

Which version of pango do I need for that?  With 1.2.5 I get a
segfault with G_OBJECT_TYPE_NAME...  Anyway, after commenting out the
printf statement I was able to proceed.

> I am wondering: are the number codes (printed as c XXX) really
> unicode codes? When I convert
>
>       \'all
>
> as utf-8, I get
>
>       c 67 w 14336 x 0 y 0
>       c 177 w 6144 x 0 y 0
>       c 177 w 6144 x 0 y 0
>       c 0 w 0 x 0 y 0

These are glyph indices into the font which Pango has selected.  I
used `strace' to find out which font Pango actually was using.

> In any event, I will need a table of unicode -> glyphname mappings.

Use FreeType's FT_Get_Glyph_Name to get a glyph name for a given glyph
index.  Pango has probably a similar function.  For the moment, we
should restrict ourselves to PS flavoured fonts which can be easily
integrated into a PS output.

> * PangoGlyphUnit <-> Real World dimension conversion.

Where's the problem?  Everything should be converted to PS points,
right?

> * How to integrate fontconfig into lilypond font-selection?

This is an important question, but it should be delayed.  For the
moment I suggest to directly use the PS font name.

> * How to handle dichotomy with TeX fonts and OTFs?

What exactly do you mean?

> * Do we need any settings for language/shaper?
{"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8783343434333801, "perplexity": 9519.803159557548}, "config": {"markdown_headings": true, "markdown_code": false, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-06/segments/1422115891802.74/warc/CC-MAIN-20150124161131-00251-ip-10-180-212-252.ec2.internal.warc.gz"}