summaryrefslogtreecommitdiff
path: root/include/freetype/ftglyph.h
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2003-06-17 10:42:27 +0000
committerWerner Lemberg <wl@gnu.org>2003-06-17 10:42:27 +0000
commite847caa318fe90fb5d909a3a535094db597d2514 (patch)
treef85ac2741b6e160492ce775032fdb233a6868b32 /include/freetype/ftglyph.h
parent09752876890755c857a808af65fe0fac9935fcdd (diff)
downloadfreetype2-e847caa318fe90fb5d909a3a535094db597d2514.tar.gz
* include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit, ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS, FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS. The lowercase variants are now (deprecated aliases) to the uppercase versions. Updated all other files. * include/freetype/ftmodule.h (ft_module_font_driver, ft_module_renderer, ft_module_hinter, ft_module_styler, ft_module_driver_scalable, ft_module_driver_no_outlines, ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER, FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER, FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES, FT_MODULE_DRIVER_HAS_HINTER. The lowercase variants are now (deprecated aliases) to the uppercase versions. Updated all other files. * src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better as enumeration. * src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c (winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add the FT_MODULE_DRIVER_NO_OUTLINES flag.
Diffstat (limited to 'include/freetype/ftglyph.h')
-rw-r--r--include/freetype/ftglyph.h56
1 files changed, 38 insertions, 18 deletions
diff --git a/include/freetype/ftglyph.h b/include/freetype/ftglyph.h
index b51e0bd7e..f635fc68d 100644
--- a/include/freetype/ftglyph.h
+++ b/include/freetype/ftglyph.h
@@ -316,11 +316,9 @@ FT_BEGIN_HEADER
/* convention. */
/* */
/* If the glyph has been loaded with FT_LOAD_NO_SCALE, `bbox_mode' */
- /* must be set to `ft_glyph_bbox_unscaled' to get unscaled font */
- /* units. */
- /* */
- /* If `bbox_mode' is set to `ft_glyph_bbox_subpixels' the bbox */
- /* coordinates are returned in 26.6 pixels (i.e. 1/64th of pixels). */
+ /* must be set to `FT_GLYPH_BBOX_UNSCALED' to get unscaled font */
+ /* units in 26.6 pixel format. The value `FT_GLYPH_BBOX_SUBPIXELS' */
+ /* is another name for this constant. */
/* */
/* Note that the maximum coordinates are exclusive, which means that */
/* one can compute the width and height of the glyph image (be it in */
@@ -330,7 +328,7 @@ FT_BEGIN_HEADER
/* height = bbox.yMax - bbox.yMin; */
/* */
/* Note also that for 26.6 coordinates, if `bbox_mode' is set to */
- /* `ft_glyph_bbox_gridfit', the coordinates will also be grid-fitted, */
+ /* `FT_GLYPH_BBOX_GRIDFIT', the coordinates will also be grid-fitted, */
/* which corresponds to: */
/* */
/* bbox.xMin = FLOOR(bbox.xMin); */
@@ -339,21 +337,43 @@ FT_BEGIN_HEADER
/* bbox.yMax = CEILING(bbox.yMax); */
/* */
/* To get the bbox in pixel coordinates, set `bbox_mode' to */
- /* `ft_glyph_bbox_truncate'. */
+ /* `FT_GLYPH_BBOX_TRUNCATE'. */
/* */
/* To get the bbox in grid-fitted pixel coordinates, set `bbox_mode' */
- /* to `ft_glyph_bbox_pixels'. */
- /* */
- /* The default value for `bbox_mode' is `ft_glyph_bbox_pixels'. */
+ /* to `FT_GLYPH_BBOX_PIXELS'. */
/* */
- enum
+ typedef enum FT_Glyph_BBox_Mode_
{
- ft_glyph_bbox_unscaled = 0, /* return unscaled font units */
- ft_glyph_bbox_subpixels = 0, /* return unfitted 26.6 coordinates */
- ft_glyph_bbox_gridfit = 1, /* return grid-fitted 26.6 coordinates */
- ft_glyph_bbox_truncate = 2, /* return coordinates in integer pixels */
- ft_glyph_bbox_pixels = 3 /* return grid-fitted pixel coordinates */
- };
+ FT_GLYPH_BBOX_UNSCALED = 0, /* return unscaled font units */
+ FT_GLYPH_BBOX_SUBPIXELS = 0, /* return unfitted 26.6 coordinates */
+ FT_GLYPH_BBOX_GRIDFIT = 1, /* return grid-fitted 26.6 coordinates */
+ FT_GLYPH_BBOX_TRUNCATE = 2, /* return coordinates in integer pixels */
+ FT_GLYPH_BBOX_PIXELS = 3 /* return grid-fitted pixel coordinates */
+
+ } FT_Glyph_BBox_Mode;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Enum> */
+ /* ft_glyph_bbox_xxx */
+ /* */
+ /* <Description> */
+ /* These constats are deprecated. Use the corresponding */
+ /* @FT_Glyph_BBox_Mode values instead. */
+ /* */
+ /* <Values> */
+ /* ft_glyph_bbox_unscaled :: see @FT_GLYPH_BBOX_UNSCALED */
+ /* ft_glyph_bbox_subpixels :: see @FT_GLYPH_BBOX_SUBPIXELS */
+ /* ft_glyph_bbox_gridfit :: see @FT_GLYPH_BBOX_GRIDFIT */
+ /* ft_glyph_bbox_truncate :: see @FT_GLYPH_BBOX_TRUNCATE */
+ /* ft_glyph_bbox_pixels :: see @FT_GLYPH_BBOX_PIXELS */
+ /* */
+#define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED
+#define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS
+#define ft_glyph_bbox_gridfit FT_GLYPH_BBOX_GRIDFIT
+#define ft_glyph_bbox_truncate FT_GLYPH_BBOX_TRUNCATE
+#define ft_glyph_bbox_pixels FT_GLYPH_BBOX_PIXELS
FT_EXPORT( void )
@@ -412,7 +432,7 @@ FT_BEGIN_HEADER
/* // convert to a bitmap (default render mode + destroy old) */
/* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */
/* { */
- /* error = FT_Glyph_To_Bitmap( &glyph, ft_render_mode_default, */
+ /* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_DEFAULT, */
/* 0, 1 ); */
/* if ( error ) // glyph unchanged */
/* ... */