Re: [ft-devel] [patch] fuller right margin in ftview
The attached patch changes the way 'ftview' fills the window with glyphs so that the right margin is less blank and a larger number of glyphs shown. It uses the actual width of the current grBitmap, instead of super conservative max_advance, when fitting the glyphs in the available space. Looks promising! Will test it soon. Werner ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] [patch] fuller right margin in ftview
The attached patch changes the way 'ftview' fills the window with glyphs so that the right margin is less blank and a larger number of glyphs shown. It uses the actual width of the current grBitmap, instead of super conservative max_advance, when fitting the glyphs in the available space. Looks promising! Will test it soon. I've picked FT_Err_Raster_Overflow to indicate the boundary. Is that appropriate? I am also considering whether to add a 2-4-pixel right margin. ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
[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] [patch] fuller right margin in ftview
I've picked FT_Err_Raster_Overflow to indicate the boundary. Is that appropriate? No, it isn't IMHO: FT_Err_Raster_Overflow is a fatal error, indicating a serious problem which the rasterizer can't manage. I think a simple integer will serve as return error instead of FT_Error. I am also considering whether to add a 2-4-pixel right margin. This is a good idea, I think. BTW, what I would *really* like to have is resizing of the demo program windows. However, this is a non-trivial issue since it means surgery within the small FreeType demo graphics library for a bunch of various platforms. A compromise might be to have command line options to set the windows size. Werner ___ 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
[ft-devel] WOFF support in FreeType?
Is there anyone interested in adding WOFF support directly to FreeType? It's a trivial amount of work. Basically you copy the SFNT code, slightly modify it, and hook up the gzip decompressor to the tables... It's so frustrating that there are essentially no tools to work with WOFF files in a typical Linux development environment... behdad ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] WOFF support in FreeType?
Is there anyone interested in adding WOFF support directly to FreeType? Yes, I will eventually add it but have'nt found time yet. It's a trivial amount of work. Basically you copy the SFNT code, slightly modify it, and hook up the gzip decompressor to the tables... Patches, please :-) Werner ___ 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
Re: [ft-devel] WOFF support in FreeType?
At present, FreeType2's compress font file I/O is designed for the case that whole of font file is compressed as single stream. On the other hand, WOFF will request the per-table decompression. The easiest support would be done by the construction of the sfnt font file image by using zlib, and pass it to FT_Face_New(). I wish if I could have a time to write a code to parse WOFF without making a whole uncompressed font image... Regards, mpsuzuki Werner LEMBERG wrote: Is there anyone interested in adding WOFF support directly to FreeType? Yes, I will eventually add it but have'nt found time yet. It's a trivial amount of work. Basically you copy the SFNT code, slightly modify it, and hook up the gzip decompressor to the tables... Patches, please :-) Werner ___ 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] [patch] fuller right margin in ftview
On Wed, Jun 27, 2012 at 8:33 AM, Werner LEMBERG w...@gnu.org wrote: I've picked FT_Err_Raster_Overflow to indicate the boundary. Is that appropriate? No, it isn't IMHO: FT_Err_Raster_Overflow is a fatal error, indicating a serious problem which the rasterizer can't manage. I think a simple integer will serve as return error instead of FT_Error. Yes, but the drawing functions ultimately inherit the error codes from FT_Glyph_To_Bitmap currently. Therefore it has to be something different from those defined in fterrdef.h to distinguish. It would be good if freetype reserved an FT_Err_User, defined as -1 or 0xFF perhaps, which is not yet taken. ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] [patch] fuller right margin in ftview
[...] the drawing functions ultimately inherit the error codes from FT_Glyph_To_Bitmap currently. Therefore it has to be something different from those defined in fterrdef.h to distinguish. It would be good if freetype reserved an FT_Err_User, defined as -1 or 0xFF perhaps, which is not yet taken. If at all, we had to reserve an error range, say, 0xF0-0xFF, since one single error code is hardly sufficient usually. However, right now a good enough solution is to define something by yourself, I think. Werner ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
[ft-devel] [PATCH] Fix CFLAGS and LDFLAGS share configure test
Broken since the origin (commit d818ba597945cd9a59583eb6efe75f58b468cfe5) Signed-off-by: Gilles Espinasse g@free.fr --- builds/unix/configure.raw |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw index 666c243..76fa0ca 100644 --- a/builds/unix/configure.raw +++ b/builds/unix/configure.raw @@ -297,7 +297,7 @@ do shift 1 ;; -m32|-m64|-march=*|-mcpu=*) # options taking no argument -AC_MSG_RESULT([whether CFLAGS and LDFLAGS share ${c}]) +AC_MSG_CHECKING([whether CFLAGS and LDFLAGS share ${c}]) if expr ${LDFLAGS} : .* ${c} *${a}.* /dev/null then AC_MSG_RESULT([yes]) -- 1.7.2.5 ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] [PATCH] Fix CFLAGS and LDFLAGS share configure test
-AC_MSG_RESULT([whether CFLAGS and LDFLAGS share ${c}]) +AC_MSG_CHECKING([whether CFLAGS and LDFLAGS share ${c}]) Applied, thanks. Werner ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel