[cairo-commit] 3 commits - doc/public NEWS src/cairo.h

Behdad Esfahbod behdad at kemper.freedesktop.org
Fri Aug 8 14:13:33 PDT 2008


 NEWS                                  |   52 ++++++++++++++++++++++++++++++++++
 doc/public/tmpl/cairo-user-fonts.sgml |    7 +++-
 src/cairo.h                           |    3 +
 3 files changed, 61 insertions(+), 1 deletion(-)

New commits:
commit e9933ba28cad1fc2219f145f5da47750b19acc7b
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Aug 8 17:12:07 2008 -0400

    [NEWS] Add some notes about recent happenings

diff --git a/NEWS b/NEWS
index 9aa263c..3ef6711 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,55 @@
+- User fonts:  This is new API allowing the user of cairo API to provide
+  drawings for glyphs in a font.  This is most useful in implementing
+  fonts in non-standard formats, like SVG fonts and Flash fonts, but can
+  also be used by games and other application to draw "funky" fonts.
+  See test/user-font.c and test/user-font-proxy.c for usage examples.
+
+  Note that user font API changed a bit just before this release.
+
+- show_text_glyphs:  This is new API allowing the caller of cairo to mark
+  text glyphs with their original text.  The PDF backend implements this
+  new API and latest Pango master uses it.  The result is (when bugs are
+  fixed) that complex text can be copied out of pangocairo's PDF output
+  correctly and reliably.  There are bugs to fix though.  A few poppler
+  bugs, and some more in cairo and pango.
+
+  To test show_text_glyph, just grab pango master & this cairo snapshot and
+  print text in gedit.  Open in acroread or evince, select all, copy, paste
+  in gedit and compare.  The Arabic text with diacritic marks is particularly
+  showing bad.  Try with pango/pango-view/HELLO.txt if you are brave
+  enough.  The Indic text is showing improvements, but is still coming out
+  buggy.
+
+- text_to_glyphs API:  This is mostly useful in combination with user-fonts.
+
+The result of the above three changes combined is that when you render text
+using cairo_show_text() and a user font, the resulting PDF file is perfectly
+text extractable.  Something one could not do with cairo before.
+
+- Toy font face constructor and getters:  Mostly for API completion, but
+  also useful for higher level (like Pango) to hook into what the user
+  has set using cairo_select_font_face(), making that toy API a bit more
+  useful.
+
+- LCD subpixel filtering using FreeType, with different filters.  Original
+  patch by David Turner.
+
+
+Known issues:
+
+- Type3 fonts generated by cairo's PDF backend may show up in poppler/Evince
+  in a different color than expected.  This is fixed in poppler master branch.
+  This mostly affects cairo user fonts.  The test case test/user-font.c
+  demonstrates this.
+
+- User fonts using other fonts in their rendering are currently embedded in
+  PDF as fallback bitmap glyphs.  This will be (hopefully) fixed before 1.8.
+  The test case test/user-font-proxy.c demonstrates this.
+
+- The win32 font backend does not work in this version.  This will be fixed
+  as soon as possible.
+
+
 Release 1.6.4 (2008-04-11 Carl Worth <cworth at cworth.org>)
 =========================================================
 The cairo community is wildly embarrassed to announce the 1.6.4
commit 8f6e52b0681384a5188277641d700f0e80e2c202
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Aug 8 17:10:35 2008 -0400

    [doc] Add short user-font section docs

diff --git a/doc/public/tmpl/cairo-user-fonts.sgml b/doc/public/tmpl/cairo-user-fonts.sgml
index b64bf25..c1cf8c4 100644
--- a/doc/public/tmpl/cairo-user-fonts.sgml
+++ b/doc/public/tmpl/cairo-user-fonts.sgml
@@ -2,11 +2,16 @@
 User Fonts
 
 <!-- ##### SECTION Short_Description ##### -->
-
+Font support with font data provided by the user
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
+The user-font feature allows the cairo user to provide drawings for glyphs
+in a font.  This is most useful in implementing fonts in non-standard
+formats, like SVG fonts and Flash fonts, but can also be used by games and
+other application to draw "funky" fonts.
 
+<!-- Include samples here -->
 </para>
 
 <!-- ##### SECTION See_Also ##### -->
commit 5227897b17d04fc6b8604d84847f85a1deb0c1f2
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Aug 8 17:06:21 2008 -0400

    Add note about zero-glyph clusters

diff --git a/src/cairo.h b/src/cairo.h
index 8b50c04..52a34e9 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -847,6 +847,9 @@ cairo_glyph_free (cairo_glyph_t *glyphs);
  *
  * For a cluster to be valid, both @num_bytes and @num_glyphs should
  * be non-negative, and at least one should be non-zero.
+ * Note that clusters with zero glyphs are not as well supported as
+ * normal clusters.  For example, PDF rendering applications typically
+ * ignore those clusters when PDF text is being selected.
  *
  * See cairo_show_text_glyphs() for how clusters are used in advanced
  * text operations.


More information about the cairo-commit mailing list