[cairo-commit] 2 commits - doc/public src/cairo-font-options.c src/cairo.h src/cairoint.h src/cairo-types-private.h src/cairo-xlib-screen.c test/font-options.c test/Makefile.am test/text-antialias-subpixel.c test/text-lcd-filter-fir3.c test/text-lcd-filter-fir3-ref.png test/text-lcd-filter-fir5.c test/text-lcd-filter-fir5-ref.png test/text-lcd-filter-intra-pixel.c test/text-lcd-filter-intra-pixel-ref.png test/text-lcd-filter-none.c test/text-lcd-filter-none-ref.png
Carl Worth
cworth at kemper.freedesktop.org
Thu Sep 18 11:21:20 PDT 2008
dev/null |binary
doc/public/tmpl/cairo-font-options.sgml | 29 ----------
src/cairo-font-options.c | 11 +---
src/cairo-types-private.h | 25 +++++++++
src/cairo-xlib-screen.c | 2
src/cairo.h | 28 ----------
src/cairoint.h | 8 ++-
test/Makefile.am | 8 ---
test/font-options.c | 4 -
test/text-antialias-subpixel.c | 1
test/text-lcd-filter-fir3.c | 85 --------------------------------
test/text-lcd-filter-fir5.c | 85 --------------------------------
test/text-lcd-filter-intra-pixel.c | 85 --------------------------------
test/text-lcd-filter-none.c | 85 --------------------------------
14 files changed, 38 insertions(+), 418 deletions(-)
New commits:
commit 46ed92e699e902cb890f202c425603cdcc953106
Author: Carl Worth <cworth at cworth.org>
Date: Wed Sep 17 10:50:28 2008 -0700
Remove text-lcd-filter tests
The lcd_filter API is gone now, and these tests were all failing
anyway.
diff --git a/test/Makefile.am b/test/Makefile.am
index 14da49d..eaaf117 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -158,10 +158,6 @@ text-antialias-gray$(EXEEXT) \
text-antialias-none$(EXEEXT) \
text-antialias-subpixel$(EXEEXT) \
text-cache-crash$(EXEEXT) \
-text-lcd-filter-fir3$(EXEEXT) \
-text-lcd-filter-fir5$(EXEEXT) \
-text-lcd-filter-intra-pixel$(EXEEXT) \
-text-lcd-filter-none$(EXEEXT) \
text-pattern$(EXEEXT) \
text-rotate$(EXEEXT) \
text-transform$(EXEEXT) \
@@ -703,10 +699,6 @@ REFERENCE_IMAGES = \
text-antialias-subpixel-quartz-ref.png \
text-glyph-range-ref.png \
text-glyph-range-rgb24-ref.png \
- text-lcd-filter-fir3-ref.png \
- text-lcd-filter-fir5-ref.png \
- text-lcd-filter-intra-pixel-ref.png \
- text-lcd-filter-none-ref.png \
text-pattern-ps-argb32-ref.png \
text-pattern-ps-rgb24-ref.png \
text-pattern-ref.png \
diff --git a/test/text-lcd-filter-fir3-ref.png b/test/text-lcd-filter-fir3-ref.png
deleted file mode 100644
index 3521e63..0000000
Binary files a/test/text-lcd-filter-fir3-ref.png and /dev/null differ
diff --git a/test/text-lcd-filter-fir3.c b/test/text-lcd-filter-fir3.c
deleted file mode 100644
index 7f95978..0000000
--- a/test/text-lcd-filter-fir3.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright © 2005 Red Hat, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of
- * Red Hat, Inc. not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior
- * permission. Red Hat, Inc. makes no representations about the
- * suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * RED HAT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL RED HAT, INC. BE LIABLE FOR ANY SPECIAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Carl D. Worth <cworth at cworth.org>
- */
-
-#include "cairo-test.h"
-
-#define WIDTH 31
-#define HEIGHT 22
-#define TEXT_SIZE 12
-
-static cairo_test_draw_function_t draw;
-
-static const cairo_test_t test = {
- "text-lcd-filter-fir3",
- "Tests text rendering with a 3x3 kernel FIR LCD filter",
- WIDTH, HEIGHT,
- draw
-};
-
-static cairo_test_status_t
-draw (cairo_t *cr, int width, int height)
-{
- cairo_text_extents_t extents;
- cairo_font_options_t *font_options;
- const char black[] = "black", blue[] = "blue";
-
- /* We draw in the default black, so paint white first. */
- cairo_save (cr);
- cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); /* white */
- cairo_paint (cr);
- cairo_restore (cr);
-
- cairo_select_font_face (cr, "Bitstream Vera Sans",
- CAIRO_FONT_SLANT_NORMAL,
- CAIRO_FONT_WEIGHT_NORMAL);
- cairo_set_font_size (cr, TEXT_SIZE);
-
- font_options = cairo_font_options_create ();
- cairo_get_font_options (cr, font_options);
- cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_SUBPIXEL);
- cairo_font_options_set_lcd_filter (font_options, CAIRO_LCD_FILTER_FIR3);
- cairo_set_font_options (cr, font_options);
-
- cairo_font_options_destroy (font_options);
-
- cairo_set_source_rgb (cr, 0, 0, 0); /* black */
- cairo_text_extents (cr, black, &extents);
- cairo_move_to (cr, -extents.x_bearing, -extents.y_bearing);
- cairo_show_text (cr, black);
- cairo_translate (cr, 0, -extents.y_bearing + 1);
-
- cairo_set_source_rgb (cr, 0, 0, 1); /* blue */
- cairo_text_extents (cr, blue, &extents);
- cairo_move_to (cr, -extents.x_bearing, -extents.y_bearing);
- cairo_show_text (cr, blue);
-
- return CAIRO_TEST_SUCCESS;
-}
-
-int
-main (void)
-{
- return cairo_test (&test);
-}
diff --git a/test/text-lcd-filter-fir5-ref.png b/test/text-lcd-filter-fir5-ref.png
deleted file mode 100644
index 319cdc1..0000000
Binary files a/test/text-lcd-filter-fir5-ref.png and /dev/null differ
diff --git a/test/text-lcd-filter-fir5.c b/test/text-lcd-filter-fir5.c
deleted file mode 100644
index a5102b9..0000000
--- a/test/text-lcd-filter-fir5.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright © 2005 Red Hat, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of
- * Red Hat, Inc. not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior
- * permission. Red Hat, Inc. makes no representations about the
- * suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * RED HAT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL RED HAT, INC. BE LIABLE FOR ANY SPECIAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Carl D. Worth <cworth at cworth.org>
- */
-
-#include "cairo-test.h"
-
-#define WIDTH 31
-#define HEIGHT 22
-#define TEXT_SIZE 12
-
-static cairo_test_draw_function_t draw;
-
-static const cairo_test_t test = {
- "text-lcd-filter-fir5",
- "Tests text rendering with a 5x5 kernel FIR LCD filter",
- WIDTH, HEIGHT,
- draw
-};
-
-static cairo_test_status_t
-draw (cairo_t *cr, int width, int height)
-{
- cairo_text_extents_t extents;
- cairo_font_options_t *font_options;
- const char black[] = "black", blue[] = "blue";
-
- /* We draw in the default black, so paint white first. */
- cairo_save (cr);
- cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); /* white */
- cairo_paint (cr);
- cairo_restore (cr);
-
- cairo_select_font_face (cr, "Bitstream Vera Sans",
- CAIRO_FONT_SLANT_NORMAL,
- CAIRO_FONT_WEIGHT_NORMAL);
- cairo_set_font_size (cr, TEXT_SIZE);
-
- font_options = cairo_font_options_create ();
- cairo_get_font_options (cr, font_options);
- cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_SUBPIXEL);
- cairo_font_options_set_lcd_filter (font_options, CAIRO_LCD_FILTER_FIR5);
- cairo_set_font_options (cr, font_options);
-
- cairo_font_options_destroy (font_options);
-
- cairo_set_source_rgb (cr, 0, 0, 0); /* black */
- cairo_text_extents (cr, black, &extents);
- cairo_move_to (cr, -extents.x_bearing, -extents.y_bearing);
- cairo_show_text (cr, black);
- cairo_translate (cr, 0, -extents.y_bearing + 1);
-
- cairo_set_source_rgb (cr, 0, 0, 1); /* blue */
- cairo_text_extents (cr, blue, &extents);
- cairo_move_to (cr, -extents.x_bearing, -extents.y_bearing);
- cairo_show_text (cr, blue);
-
- return CAIRO_TEST_SUCCESS;
-}
-
-int
-main (void)
-{
- return cairo_test (&test);
-}
diff --git a/test/text-lcd-filter-intra-pixel-ref.png b/test/text-lcd-filter-intra-pixel-ref.png
deleted file mode 100644
index 03a8afa..0000000
Binary files a/test/text-lcd-filter-intra-pixel-ref.png and /dev/null differ
diff --git a/test/text-lcd-filter-intra-pixel.c b/test/text-lcd-filter-intra-pixel.c
deleted file mode 100644
index c02b441..0000000
--- a/test/text-lcd-filter-intra-pixel.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright © 2005 Red Hat, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of
- * Red Hat, Inc. not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior
- * permission. Red Hat, Inc. makes no representations about the
- * suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * RED HAT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL RED HAT, INC. BE LIABLE FOR ANY SPECIAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Carl D. Worth <cworth at cworth.org>
- */
-
-#include "cairo-test.h"
-
-#define WIDTH 31
-#define HEIGHT 22
-#define TEXT_SIZE 12
-
-static cairo_test_draw_function_t draw;
-
-static const cairo_test_t test = {
- "text-lcd-filter-intra-pixel",
- "Tests text rendering with intra-pixel LCD filter",
- WIDTH, HEIGHT,
- draw
-};
-
-static cairo_test_status_t
-draw (cairo_t *cr, int width, int height)
-{
- cairo_text_extents_t extents;
- cairo_font_options_t *font_options;
- const char black[] = "black", blue[] = "blue";
-
- /* We draw in the default black, so paint white first. */
- cairo_save (cr);
- cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); /* white */
- cairo_paint (cr);
- cairo_restore (cr);
-
- cairo_select_font_face (cr, "Bitstream Vera Sans",
- CAIRO_FONT_SLANT_NORMAL,
- CAIRO_FONT_WEIGHT_NORMAL);
- cairo_set_font_size (cr, TEXT_SIZE);
-
- font_options = cairo_font_options_create ();
- cairo_get_font_options (cr, font_options);
- cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_SUBPIXEL);
- cairo_font_options_set_lcd_filter (font_options, CAIRO_LCD_FILTER_INTRA_PIXEL);
- cairo_set_font_options (cr, font_options);
-
- cairo_font_options_destroy (font_options);
-
- cairo_set_source_rgb (cr, 0, 0, 0); /* black */
- cairo_text_extents (cr, black, &extents);
- cairo_move_to (cr, -extents.x_bearing, -extents.y_bearing);
- cairo_show_text (cr, black);
- cairo_translate (cr, 0, -extents.y_bearing + 1);
-
- cairo_set_source_rgb (cr, 0, 0, 1); /* blue */
- cairo_text_extents (cr, blue, &extents);
- cairo_move_to (cr, -extents.x_bearing, -extents.y_bearing);
- cairo_show_text (cr, blue);
-
- return CAIRO_TEST_SUCCESS;
-}
-
-int
-main (void)
-{
- return cairo_test (&test);
-}
diff --git a/test/text-lcd-filter-none-ref.png b/test/text-lcd-filter-none-ref.png
deleted file mode 100644
index 3213833..0000000
Binary files a/test/text-lcd-filter-none-ref.png and /dev/null differ
diff --git a/test/text-lcd-filter-none.c b/test/text-lcd-filter-none.c
deleted file mode 100644
index f84483e..0000000
--- a/test/text-lcd-filter-none.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright © 2005 Red Hat, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of
- * Red Hat, Inc. not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior
- * permission. Red Hat, Inc. makes no representations about the
- * suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * RED HAT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL RED HAT, INC. BE LIABLE FOR ANY SPECIAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Carl D. Worth <cworth at cworth.org>
- */
-
-#include "cairo-test.h"
-
-#define WIDTH 31
-#define HEIGHT 22
-#define TEXT_SIZE 12
-
-static cairo_test_draw_function_t draw;
-
-static const cairo_test_t test = {
- "text-lcd-filter-none",
- "Tests text rendering with no LCD filter",
- WIDTH, HEIGHT,
- draw
-};
-
-static cairo_test_status_t
-draw (cairo_t *cr, int width, int height)
-{
- cairo_text_extents_t extents;
- cairo_font_options_t *font_options;
- const char black[] = "black", blue[] = "blue";
-
- /* We draw in the default black, so paint white first. */
- cairo_save (cr);
- cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); /* white */
- cairo_paint (cr);
- cairo_restore (cr);
-
- cairo_select_font_face (cr, "Bitstream Vera Sans",
- CAIRO_FONT_SLANT_NORMAL,
- CAIRO_FONT_WEIGHT_NORMAL);
- cairo_set_font_size (cr, TEXT_SIZE);
-
- font_options = cairo_font_options_create ();
- cairo_get_font_options (cr, font_options);
- cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_SUBPIXEL);
- cairo_font_options_set_lcd_filter (font_options, CAIRO_LCD_FILTER_NONE);
- cairo_set_font_options (cr, font_options);
-
- cairo_font_options_destroy (font_options);
-
- cairo_set_source_rgb (cr, 0, 0, 0); /* black */
- cairo_text_extents (cr, black, &extents);
- cairo_move_to (cr, -extents.x_bearing, -extents.y_bearing);
- cairo_show_text (cr, black);
- cairo_translate (cr, 0, -extents.y_bearing + 1);
-
- cairo_set_source_rgb (cr, 0, 0, 1); /* blue */
- cairo_text_extents (cr, blue, &extents);
- cairo_move_to (cr, -extents.x_bearing, -extents.y_bearing);
- cairo_show_text (cr, blue);
-
- return CAIRO_TEST_SUCCESS;
-}
-
-int
-main (void)
-{
- return cairo_test (&test);
-}
commit 1b42bc8033bc4682c9688086c08ca3ad306a2ae8
Author: Carl Worth <cworth at cworth.org>
Date: Tue Sep 16 17:04:38 2008 -0700
Make the lcd_filter API private
During the cairo summit it was decided that this API is to freetype-
specific to be in the general cairo interface for now. This will
likely come back again soon as a cairo_ft-specific interface.
diff --git a/doc/public/tmpl/cairo-font-options.sgml b/doc/public/tmpl/cairo-font-options.sgml
index 62a6b30..501abf4 100644
--- a/doc/public/tmpl/cairo-font-options.sgml
+++ b/doc/public/tmpl/cairo-font-options.sgml
@@ -137,35 +137,6 @@ output on a particular display.
@Returns:
-<!-- ##### ENUM cairo_lcd_filter_t ##### -->
-<para>
-
-</para>
-
- at CAIRO_LCD_FILTER_DEFAULT:
- at CAIRO_LCD_FILTER_NONE:
- at CAIRO_LCD_FILTER_INTRA_PIXEL:
- at CAIRO_LCD_FILTER_FIR3:
- at CAIRO_LCD_FILTER_FIR5:
-
-<!-- ##### FUNCTION cairo_font_options_set_lcd_filter ##### -->
-<para>
-
-</para>
-
- at options:
- at lcd_filter:
-
-
-<!-- ##### FUNCTION cairo_font_options_get_lcd_filter ##### -->
-<para>
-
-</para>
-
- at options:
- at Returns:
-
-
<!-- ##### ENUM cairo_hint_style_t ##### -->
<para>
diff --git a/src/cairo-font-options.c b/src/cairo-font-options.c
index b3fb274..64a8911 100644
--- a/src/cairo-font-options.c
+++ b/src/cairo-font-options.c
@@ -335,7 +335,7 @@ cairo_font_options_get_subpixel_order (const cairo_font_options_t *options)
}
/**
- * cairo_font_options_set_lcd_filter:
+ * _cairo_font_options_set_lcd_filter:
* @options: a #cairo_font_options_t
* @lcd_filter: the new LCD filter
*
@@ -347,18 +347,17 @@ cairo_font_options_get_subpixel_order (const cairo_font_options_t *options)
* Since: 1.8
**/
void
-cairo_font_options_set_lcd_filter (cairo_font_options_t *options,
- cairo_lcd_filter_t lcd_filter)
+_cairo_font_options_set_lcd_filter (cairo_font_options_t *options,
+ cairo_lcd_filter_t lcd_filter)
{
if (cairo_font_options_status (options))
return;
options->lcd_filter = lcd_filter;
}
-slim_hidden_def (cairo_font_options_set_lcd_filter);
/**
- * cairo_font_options_get_lcd_filter:
+ * _cairo_font_options_get_lcd_filter:
* @options: a #cairo_font_options_t
*
* Gets the LCD filter for the font options object.
@@ -369,7 +368,7 @@ slim_hidden_def (cairo_font_options_set_lcd_filter);
* Since: 1.8
**/
cairo_lcd_filter_t
-cairo_font_options_get_lcd_filter (const cairo_font_options_t *options)
+_cairo_font_options_get_lcd_filter (const cairo_font_options_t *options)
{
if (cairo_font_options_status ((cairo_font_options_t *) options))
return CAIRO_LCD_FILTER_DEFAULT;
diff --git a/src/cairo-types-private.h b/src/cairo-types-private.h
index c2d962d..006aec0 100644
--- a/src/cairo-types-private.h
+++ b/src/cairo-types-private.h
@@ -115,6 +115,31 @@ struct _cairo_array {
cairo_bool_t is_snapshot;
};
+
+/**
+ * cairo_lcd_filter_t:
+ * @CAIRO_LCD_FILTER_DEFAULT: Use the default LCD filter for
+ * font backend and target device
+ * @CAIRO_LCD_FILTER_NONE: Do not perform LCD filtering
+ * @CAIRO_LCD_FILTER_INTRA_PIXEL: Intra-pixel filter
+ * @CAIRO_LCD_FILTER_FIR3: FIR filter with a 3x3 kernel
+ * @CAIRO_LCD_FILTER_FIR5: FIR filter with a 5x5 kernel
+ *
+ * The LCD filter specifies the low-pass filter applied to LCD-optimized
+ * bitmaps generated with an antialiasing mode of %CAIRO_ANTIALIAS_SUBPIXEL.
+ *
+ * Note: This API was temporarily made available in the public
+ * interface during the 1.7.x development series, but was made private
+ * before 1.8.
+ **/
+typedef enum _cairo_lcd_filter {
+ CAIRO_LCD_FILTER_DEFAULT,
+ CAIRO_LCD_FILTER_NONE,
+ CAIRO_LCD_FILTER_INTRA_PIXEL,
+ CAIRO_LCD_FILTER_FIR3,
+ CAIRO_LCD_FILTER_FIR5
+} cairo_lcd_filter_t;
+
struct _cairo_font_options {
cairo_antialias_t antialias;
cairo_subpixel_order_t subpixel_order;
diff --git a/src/cairo-xlib-screen.c b/src/cairo-xlib-screen.c
index 4a26eee..37e3418 100644
--- a/src/cairo-xlib-screen.c
+++ b/src/cairo-xlib-screen.c
@@ -278,7 +278,7 @@ _cairo_xlib_init_screen_font_options (Display *dpy, cairo_xlib_screen_info_t *in
cairo_font_options_set_hint_style (&info->font_options, hint_style);
cairo_font_options_set_antialias (&info->font_options, antialias);
cairo_font_options_set_subpixel_order (&info->font_options, subpixel_order);
- cairo_font_options_set_lcd_filter (&info->font_options, lcd_filter);
+ _cairo_font_options_set_lcd_filter (&info->font_options, lcd_filter);
cairo_font_options_set_hint_metrics (&info->font_options, CAIRO_HINT_METRICS_ON);
}
diff --git a/src/cairo.h b/src/cairo.h
index ad6d5b5..6758a4d 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -1042,28 +1042,6 @@ typedef enum _cairo_subpixel_order {
} cairo_subpixel_order_t;
/**
- * cairo_lcd_filter_t:
- * @CAIRO_LCD_FILTER_DEFAULT: Use the default LCD filter for
- * font backend and target device
- * @CAIRO_LCD_FILTER_NONE: Do not perform LCD filtering
- * @CAIRO_LCD_FILTER_INTRA_PIXEL: Intra-pixel filter
- * @CAIRO_LCD_FILTER_FIR3: FIR filter with a 3x3 kernel
- * @CAIRO_LCD_FILTER_FIR5: FIR filter with a 5x5 kernel
- *
- * The LCD filter specifies the low-pass filter applied to LCD-optimized
- * bitmaps generated with an antialiasing mode of %CAIRO_ANTIALIAS_SUBPIXEL.
- *
- * Since: 1.8
- **/
-typedef enum _cairo_lcd_filter {
- CAIRO_LCD_FILTER_DEFAULT,
- CAIRO_LCD_FILTER_NONE,
- CAIRO_LCD_FILTER_INTRA_PIXEL,
- CAIRO_LCD_FILTER_FIR3,
- CAIRO_LCD_FILTER_FIR5
-} cairo_lcd_filter_t;
-
-/**
* cairo_hint_style_t:
* @CAIRO_HINT_STYLE_DEFAULT: Use the default hint style for
* font backend and target device
@@ -1169,12 +1147,6 @@ cairo_public cairo_subpixel_order_t
cairo_font_options_get_subpixel_order (const cairo_font_options_t *options);
cairo_public void
-cairo_font_options_set_lcd_filter (cairo_font_options_t *options,
- cairo_lcd_filter_t lcd_filter);
-cairo_public cairo_lcd_filter_t
-cairo_font_options_get_lcd_filter (const cairo_font_options_t *options);
-
-cairo_public void
cairo_font_options_set_hint_style (cairo_font_options_t *options,
cairo_hint_style_t hint_style);
cairo_public cairo_hint_style_t
diff --git a/src/cairoint.h b/src/cairoint.h
index 0f10bd8..da57c3e 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -1342,6 +1342,13 @@ cairo_private void
_cairo_font_options_init_copy (cairo_font_options_t *options,
const cairo_font_options_t *other);
+cairo_private void
+_cairo_font_options_set_lcd_filter (cairo_font_options_t *options,
+ cairo_lcd_filter_t lcd_filter);
+
+cairo_private cairo_lcd_filter_t
+_cairo_font_options_get_lcd_filter (const cairo_font_options_t *options);
+
/* cairo-hull.c */
cairo_private cairo_status_t
_cairo_hull_compute (cairo_pen_vertex_t *vertices, int *num_vertices);
@@ -2375,7 +2382,6 @@ slim_hidden_proto (cairo_font_options_merge);
slim_hidden_proto (cairo_font_options_set_antialias);
slim_hidden_proto (cairo_font_options_set_hint_metrics);
slim_hidden_proto (cairo_font_options_set_hint_style);
-slim_hidden_proto (cairo_font_options_set_lcd_filter);
slim_hidden_proto (cairo_font_options_set_subpixel_order);
slim_hidden_proto (cairo_font_options_status);
slim_hidden_proto (cairo_get_current_point);
diff --git a/test/font-options.c b/test/font-options.c
index 90c7441..fd61a73 100644
--- a/test/font-options.c
+++ b/test/font-options.c
@@ -70,10 +70,6 @@ main (void)
cairo_font_options_get_subpixel_order (NULL);
assert (cairo_font_options_get_subpixel_order (default_options) == CAIRO_SUBPIXEL_ORDER_DEFAULT);
- cairo_font_options_set_lcd_filter (NULL, CAIRO_LCD_FILTER_DEFAULT);
- cairo_font_options_get_lcd_filter (NULL);
- assert (cairo_font_options_get_lcd_filter (default_options) == CAIRO_LCD_FILTER_DEFAULT);
-
cairo_font_options_set_hint_style (NULL, CAIRO_HINT_STYLE_DEFAULT);
cairo_font_options_get_hint_style (NULL);
assert (cairo_font_options_get_hint_style (default_options) == CAIRO_HINT_STYLE_DEFAULT);
diff --git a/test/text-antialias-subpixel.c b/test/text-antialias-subpixel.c
index a998997..a92d64f 100644
--- a/test/text-antialias-subpixel.c
+++ b/test/text-antialias-subpixel.c
@@ -57,7 +57,6 @@ draw (cairo_t *cr, int width, int height)
cairo_get_font_options (cr, font_options);
cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_SUBPIXEL);
cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_RGB);
- cairo_font_options_set_lcd_filter (font_options, CAIRO_LCD_FILTER_NONE);
cairo_set_font_options (cr, font_options);
cairo_font_options_destroy (font_options);
More information about the cairo-commit
mailing list