Someone called adrianj on irc #cairo has been really helpful. It seems that what is happening is font-substitution. The actual font that has the musical symbols is FreeSerif, and if you put
(d-DirectivePut-standalone-graphic "test" " ABCDEFG\xF0\x9D\x84\x9E FreeSerif 66") (d-RefreshDisplay) into the scheme window and execute it you see the letters ABCDEFG followed by a treble clef, which is the \xF0\x9D\x84\x9E bit in the code above. Before we launch into writing code to seek out installed fonts with the desired music symbols it seems to me that we should package this font with denemo, and work towards dropping denemo.ttf. (We can't instantly do so because the highlighting method in the snippets needs changing). I haven't found the licensing information about FreeSerif but I expect it is ok. Richard On Mon, 2011-07-25 at 09:57 +0100, Richard Shann wrote: > On Sun, 2011-07-24 at 19:58 +0200, R. Mattes wrote: > > > > Unfortunately I'm about to leave for a concert trip to Italy ... > > Just tuning up the instruments and stuffing my suitcase. > > I'll debug as soon as I'm back. > > > > RalfD > > > > Richard > > > > > > > > > > > As you can see, I've configured my locale to use utf-8. If your > > locale > > > > isn't utf-aware > > > > Cairo will render the musical characters as two bytes. > > Meanwhile, I have been digging a bit deeper. It seems that it is, indeed > the four byte characters that don't show properly. But what shows is a > single box, not two spurious characters. It is like the font didn't have > a glyph for that value, but, I can see from the terminal, most fonts do, > and it doesn't matter which I try. > I have put this message on irc at #cairo > > I am having trouble with cairo_show_text() when I have a four byte utf-8 > character to display. The program (denemo) uses bind_textdomain_codeset > (PACKAGE, "UTF-8"); in main, and I have the locale set to .utf8 in the > environment, but I only get two byte characters printing from cairo. > Debug output in the terminal renders the 4-byte utf8 correctly. Any > ideas? > > but it seems I am also having trouble with my internet connection, so if > anyone else can ask around that would be good. > > Richard > > > > _______________________________________________ > Denemo-devel mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/denemo-devel _______________________________________________ Denemo-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/denemo-devel
