[ft-devel] Ligature support in Freetype?
Hello freetype-devel'ers, I was wondering if anyone on this list might be able to help me work out the effort required to support the FF Chartwell font in freetype2: https://www.fontfont.com/how-to-use-ff-chartwell This is a font which uses ligatures to create small, interesting, bar-charts and graphs and so on (please see the site referred). Its my understanding, (per this thread: http://lists.gnu.org/archive/html/freetype-devel/2008-12/msg7.html), that Freetype won't work directly with this method of specifying the ligature, but in case I misunderstand I thought I would introduce myself, and the problem to this community. I'm working with the MOAI SDK these days (http://getmoai.com/) which is using libfreetype2 for its rendering needs, and I am trying to work out what it would take to get these special ligatures supported in freetype2 for use within the MOAI context - or if its even possible at all? If anyone else is interested in this topic, and knows about how to handle these ligature types, I'd love to hear about it - I'm a newbie to freetype2, but willing to learn a great deal from someone on this list who knows what they're doing (and has the patience to explain it) - perhaps its of interest in general, also, to get such support in freetype2 among this community? If there is something you need to know about the Chartwell font, I can provide details as I have purchased the font already. Hope this is appropriate for this list and of interest to you freetype developers too! -- Jay Vaughan j...@allaboutapps.at ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] Ligature support in Freetype?
I was wondering if anyone on this list might be able to help me work out the effort required to support the FF Chartwell font in freetype2: https://www.fontfont.com/how-to-use-ff-chartwell Direct support in FreeType? Nope. You need either Pango, ICU, or HarfBuzz which are OpenType libraries on top of FreeType (and others also); then it works out of the box. Werner ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] Ligature support in Freetype?
On 06/27/2012 07:41 AM, Jay Vaughan wrote: Direct support in FreeType? Nope. You need either Pango, ICU, or HarfBuzz which are OpenType libraries on top of FreeType (and others also); then it works out of the box. Thanks for the answer! I guess we're already using freetype2 in moai, and so my next big mystery is .. how would I integrate something like harfbuzz on top of our freetype2 usage in order to gain a ligature feature? I understand this is a stupid question, potentially, so I'll keep researching this, and reading some code to try to understand the approach to solving the problem .. but if anyone feels motivated to explain to me how I might approach this, I'd be very grateful. Here's a simple example: https://github.com/anoek/ex-sdl-cairo-freetype-harfbuzz behdad ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] Ligature support in Freetype?
On 06/27/2012 08:27 AM, Werner LEMBERG wrote: Here's a simple example: https://github.com/anoek/ex-sdl-cairo-freetype-harfbuzz Okay, thanks for that .. it looks like something I can work with. I guess I'll have to commit to adding pango or harfbuzz support to MOAI, then .. time to do some study. Thanks for the pointers! Well, this doesn't compile out of the box. Behdad, have you seen this my mail to the HarfBuzz list which contains a patch? I did. I don't maintain that file however. We should add a minimal HarfBuzz + FreeType + Cairo example to HarfBuzz. Any volunteers? behdad ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] Ligature support in Freetype?
After applying that patch, it still doesn't build. j@aaa-build:~/Desktop/ex-sdl-cairo-freetype-harfbuzz$ make gcc ex-sdl-cairo-freetype-harfbuzz.c --std=c99 -g -Wall --pedantic `pkg-config freetype2 --cflags` `pkg-config glib-2.0 --cflags` `pkg-config harfbuzz --cflags` `pkg-config cairo-ft --cflags` `pkg-config SDL_image --cflags` -o ex-sdl-cairo-freetype-harfbuzz `icu-config --ldflags` `pkg-config freetype2 --libs` `pkg-config harfbuzz --libs` `pkg-config glib-2.0 --libs` `pkg-config cairo-ft --libs` `pkg-config SDL_image --libs` ex-sdl-cairo-freetype-harfbuzz.c: In function ‘main’: ex-sdl-cairo-freetype-harfbuzz.c:146:13: error: too few arguments to function ‘hb_buffer_create’ /usr/local/include/harfbuzz/hb-buffer.h:63:1: note: declared here ex-sdl-cairo-freetype-harfbuzz.c:151:13: error: too many arguments to function ‘hb_language_from_string’ /usr/local/include/harfbuzz/hb-common.h:123:1: note: declared here I'd be happy to contribute back a working example if I get this fixed .. -- Jay Vaughan j...@allaboutapps.at On Jun 27, 2012, at 2:31 PM, Behdad Esfahbod wrote: On 06/27/2012 08:27 AM, Werner LEMBERG wrote: Here's a simple example: https://github.com/anoek/ex-sdl-cairo-freetype-harfbuzz Okay, thanks for that .. it looks like something I can work with. I guess I'll have to commit to adding pango or harfbuzz support to MOAI, then .. time to do some study. Thanks for the pointers! Well, this doesn't compile out of the box. Behdad, have you seen this my mail to the HarfBuzz list which contains a patch? I did. I don't maintain that file however. We should add a minimal HarfBuzz + FreeType + Cairo example to HarfBuzz. Any volunteers? behdad ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] Ligature support in Freetype?
On 06/27/2012 08:33 AM, Jay Vaughan wrote: ex-sdl-cairo-freetype-harfbuzz.c:146:13: error: too few arguments to function ‘hb_buffer_create’ /usr/local/include/harfbuzz/hb-buffer.h:63:1: note: declared here ex-sdl-cairo-freetype-harfbuzz.c:151:13: error: too many arguments to function ‘hb_language_from_string’ /usr/local/include/harfbuzz/hb-common.h:123:1: note: declared here Seems like you have a very old version of HarfBuzz. I just pushed a snapshot here: http://www.freedesktop.org/software/harfbuzz/release/ behdad ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] Ligature support in Freetype?
Great - thanks for pointing that out. The sample is now running. I've tried add FF Chartwell to the app, but do not quite yet know how to tell harfbuzz to use the StylisticSet01/ligatures feature of the font.. yet. Any chance you guys want to meet in IRC? -- Jay Vaughan j...@allaboutapps.at On Jun 27, 2012, at 2:37 PM, Behdad Esfahbod wrote: On 06/27/2012 08:33 AM, Jay Vaughan wrote: ex-sdl-cairo-freetype-harfbuzz.c:146:13: error: too few arguments to function ‘hb_buffer_create’ /usr/local/include/harfbuzz/hb-buffer.h:63:1: note: declared here ex-sdl-cairo-freetype-harfbuzz.c:151:13: error: too many arguments to function ‘hb_language_from_string’ /usr/local/include/harfbuzz/hb-common.h:123:1: note: declared here Seems like you have a very old version of HarfBuzz. I just pushed a snapshot here: http://www.freedesktop.org/software/harfbuzz/release/ behdad ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] Ligature support in Freetype?
In the call to hb_shape(), you need to pass in features. Sure, I'm on the #harfbuzz channel on freenode. On 06/27/2012 08:47 AM, Jay Vaughan wrote: Great - thanks for pointing that out. The sample is now running. I've tried add FF Chartwell to the app, but do not quite yet know how to tell harfbuzz to use the StylisticSet01/ligatures feature of the font.. yet. Any chance you guys want to meet in IRC? -- Jay Vaughan j...@allaboutapps.at On Jun 27, 2012, at 2:37 PM, Behdad Esfahbod wrote: On 06/27/2012 08:33 AM, Jay Vaughan wrote: ex-sdl-cairo-freetype-harfbuzz.c:146:13: error: too few arguments to function ‘hb_buffer_create’ /usr/local/include/harfbuzz/hb-buffer.h:63:1: note: declared here ex-sdl-cairo-freetype-harfbuzz.c:151:13: error: too many arguments to function ‘hb_language_from_string’ /usr/local/include/harfbuzz/hb-common.h:123:1: note: declared here Seems like you have a very old version of HarfBuzz. I just pushed a snapshot here: http://www.freedesktop.org/software/harfbuzz/release/ behdad ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] Ligature support in Freetype?
Great, I have it working! And in fact, Chartwell looks pretty good - although I haven't set up the font sizes and coloring to really show it off, this screenshot at least shows that it works very smoothly. So, I'll try to add harfbuzz integration into the MOAI client next .. Thanks for your help guys! http://imgur.com/8pblg (If anyone wants the modified ex-sdl-cairo-freetype-harfbuzz project, with Chartwell inserted, let me know and I'll send it to you..) -- Jay Vaughan j...@allaboutapps.at ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] Ligature support in Freetype?
I'd be happy to contribute back a working example if I get this fixed .. The working example, wherein Chartwell is demonstrated: http://w1xer.at/ex-sdl-cairo-freetype-harfbuzz_CHARTWELL_HACK.c Thanks for the help you guys, I'll be moving forward on harfbuzz+moai integration next .. j. ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel