2002-04-20 07:38:33 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* pfrdrivr.c */
|
|
|
|
/* */
|
|
|
|
/* FreeType PFR driver interface (body). */
|
|
|
|
/* */
|
2015-01-17 20:41:43 +01:00
|
|
|
/* Copyright 2002-2015 by */
|
2002-04-20 07:38:33 +02:00
|
|
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
|
|
|
/* */
|
|
|
|
/* This file is part of the FreeType project, and may only be used, */
|
|
|
|
/* modified, and distributed under the terms of the FreeType project */
|
|
|
|
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
|
|
|
/* this file you indicate that you have read the license and */
|
|
|
|
/* understand and accept it fully. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
|
2002-04-19 17:13:47 +02:00
|
|
|
#include <ft2build.h>
|
|
|
|
#include FT_INTERNAL_DEBUG_H
|
|
|
|
#include FT_INTERNAL_STREAM_H
|
* include/freetype/internal/fnttypes.h,
include/freetype/internal/ftserv.h, src/base/ftbdf.c, src/base/ftmm.c,
src/base/ftobjs.c, src/base/ftpfr.c, src/base/ftwinfnt.c,
src/base/ftxf86.c, src/pfr/pfrdrivr.c, src/winfonts/winfnt.c,
src/winfonts/winfnt.h, include/freetype/internal/service/svwinfnt.h,:
simplification of service lookup macros, updating the PFR and
WINFNT font drivers to new services
2003-09-21 19:15:55 +02:00
|
|
|
#include FT_SERVICE_PFR_H
|
|
|
|
#include FT_SERVICE_XFREE86_NAME_H
|
2002-04-19 17:13:47 +02:00
|
|
|
#include "pfrdrivr.h"
|
|
|
|
#include "pfrobjs.h"
|
|
|
|
|
2003-09-12 22:32:51 +02:00
|
|
|
#include "pfrerror.h"
|
|
|
|
|
* src/truetype/ttinterp.c (CUR_Func_move_orig): New macro.
(Direct_Move_Orig, Direct_Move_Orig_X, Direct_Move_Orig_Y): New
functions. Similar to Direct_Move, Direct_Move_X, and
Direct_Move_Y but without touching.
(Compute_Funcs): Use new functions.
(Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid,
Round_Up_To_Grid, Round_To_Double_Grid, Round_Super,
Round_Super_45): Fix rounding of value zero.
(DO_DIV): Don't use TT_MULDIV.
(Ins_SHC): This instruction actually touches the points.
(Ins_MSIRP): Fix undocumented behaviour.
* src/truetype/ttinterp.h (TT_ExecContextRec): Updated.
* docs/VERSION.DLL: Updated.
* src/base/ftobjs.c (FT_Set_Char_Size): Make metrics->x_scale and
metrics->y_scale really precise.
(FT_Load_Glyph): Update computation of linearHoriAdvance and
linearVertAdvance.
* src/true/type/ttinterp.c (Update_Max): Use FT_REALLOC.
2003-11-24 23:54:58 +01:00
|
|
|
|
* src/pfr/pfrobjs.c, src/pfr/pfrobjs.h (pfr_face_init,
pfr_face_done, pfr_face_get_kerning, pfr_slot_init, pfr_slot_done,
pfr_slot_load): Don't use PFR_XXX but FT_XXX arguments which are
typecast to the proper PFR_XXX types within the function.
Update code accordingly.
* src/pfr/pfrdrivr.c (pfr_get_kerning, pfr_get_advance,
pfr_get_metrics, pfr_get_service): Don't use PFR_XXX but FT_XXX
arguments which are typecast to the proper PFR_XXX types within the
function.
Update code accordingly.
Use FT_CALLBACK_DEF throughout.
(pfr_metrics_service_rec, pfr_driver_class): Remove casts.
2004-05-08 09:00:23 +02:00
|
|
|
FT_CALLBACK_DEF( FT_Error )
|
|
|
|
pfr_get_kerning( FT_Face pfrface, /* PFR_Face */
|
2002-10-31 09:30:19 +01:00
|
|
|
FT_UInt left,
|
|
|
|
FT_UInt right,
|
|
|
|
FT_Vector *avector )
|
|
|
|
{
|
* src/pfr/pfrobjs.c, src/pfr/pfrobjs.h (pfr_face_init,
pfr_face_done, pfr_face_get_kerning, pfr_slot_init, pfr_slot_done,
pfr_slot_load): Don't use PFR_XXX but FT_XXX arguments which are
typecast to the proper PFR_XXX types within the function.
Update code accordingly.
* src/pfr/pfrdrivr.c (pfr_get_kerning, pfr_get_advance,
pfr_get_metrics, pfr_get_service): Don't use PFR_XXX but FT_XXX
arguments which are typecast to the proper PFR_XXX types within the
function.
Update code accordingly.
Use FT_CALLBACK_DEF throughout.
(pfr_metrics_service_rec, pfr_driver_class): Remove casts.
2004-05-08 09:00:23 +02:00
|
|
|
PFR_Face face = (PFR_Face)pfrface;
|
2003-04-23 21:48:24 +02:00
|
|
|
PFR_PhyFont phys = &face->phy_font;
|
2002-10-31 09:30:19 +01:00
|
|
|
|
2003-04-23 16:14:06 +02:00
|
|
|
|
2014-11-25 08:30:49 +01:00
|
|
|
(void)pfr_face_get_kerning( pfrface, left, right, avector );
|
2003-04-23 16:14:06 +02:00
|
|
|
|
2003-04-23 21:48:24 +02:00
|
|
|
/* convert from metrics to outline units when necessary */
|
|
|
|
if ( phys->outline_resolution != phys->metrics_resolution )
|
|
|
|
{
|
|
|
|
if ( avector->x != 0 )
|
2015-02-21 09:52:29 +01:00
|
|
|
avector->x = FT_MulDiv( avector->x,
|
|
|
|
(FT_Long)phys->outline_resolution,
|
|
|
|
(FT_Long)phys->metrics_resolution );
|
2002-10-31 09:30:19 +01:00
|
|
|
|
2003-04-23 21:48:24 +02:00
|
|
|
if ( avector->y != 0 )
|
2015-02-21 09:52:29 +01:00
|
|
|
avector->y = FT_MulDiv( avector->x,
|
|
|
|
(FT_Long)phys->outline_resolution,
|
|
|
|
(FT_Long)phys->metrics_resolution );
|
2002-10-31 09:30:19 +01:00
|
|
|
}
|
2003-04-23 16:14:06 +02:00
|
|
|
|
2013-03-14 11:21:17 +01:00
|
|
|
return FT_Err_Ok;
|
2002-10-31 09:30:19 +01:00
|
|
|
}
|
|
|
|
|
* src/truetype/ttinterp.c (CUR_Func_move_orig): New macro.
(Direct_Move_Orig, Direct_Move_Orig_X, Direct_Move_Orig_Y): New
functions. Similar to Direct_Move, Direct_Move_X, and
Direct_Move_Y but without touching.
(Compute_Funcs): Use new functions.
(Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid,
Round_Up_To_Grid, Round_To_Double_Grid, Round_Super,
Round_Super_45): Fix rounding of value zero.
(DO_DIV): Don't use TT_MULDIV.
(Ins_SHC): This instruction actually touches the points.
(Ins_MSIRP): Fix undocumented behaviour.
* src/truetype/ttinterp.h (TT_ExecContextRec): Updated.
* docs/VERSION.DLL: Updated.
* src/base/ftobjs.c (FT_Set_Char_Size): Make metrics->x_scale and
metrics->y_scale really precise.
(FT_Load_Glyph): Update computation of linearHoriAdvance and
linearVertAdvance.
* src/true/type/ttinterp.c (Update_Max): Use FT_REALLOC.
2003-11-24 23:54:58 +01:00
|
|
|
|
* include/freetype/internal/fnttypes.h,
include/freetype/internal/ftserv.h, src/base/ftbdf.c, src/base/ftmm.c,
src/base/ftobjs.c, src/base/ftpfr.c, src/base/ftwinfnt.c,
src/base/ftxf86.c, src/pfr/pfrdrivr.c, src/winfonts/winfnt.c,
src/winfonts/winfnt.h, include/freetype/internal/service/svwinfnt.h,:
simplification of service lookup macros, updating the PFR and
WINFNT font drivers to new services
2003-09-21 19:15:55 +02:00
|
|
|
/*
|
|
|
|
* PFR METRICS SERVICE
|
|
|
|
*
|
|
|
|
*/
|
2002-10-31 09:30:19 +01:00
|
|
|
|
* src/pfr/pfrobjs.c, src/pfr/pfrobjs.h (pfr_face_init,
pfr_face_done, pfr_face_get_kerning, pfr_slot_init, pfr_slot_done,
pfr_slot_load): Don't use PFR_XXX but FT_XXX arguments which are
typecast to the proper PFR_XXX types within the function.
Update code accordingly.
* src/pfr/pfrdrivr.c (pfr_get_kerning, pfr_get_advance,
pfr_get_metrics, pfr_get_service): Don't use PFR_XXX but FT_XXX
arguments which are typecast to the proper PFR_XXX types within the
function.
Update code accordingly.
Use FT_CALLBACK_DEF throughout.
(pfr_metrics_service_rec, pfr_driver_class): Remove casts.
2004-05-08 09:00:23 +02:00
|
|
|
FT_CALLBACK_DEF( FT_Error )
|
|
|
|
pfr_get_advance( FT_Face pfrface, /* PFR_Face */
|
* src/truetype/ttinterp.c (CUR_Func_move_orig): New macro.
(Direct_Move_Orig, Direct_Move_Orig_X, Direct_Move_Orig_Y): New
functions. Similar to Direct_Move, Direct_Move_X, and
Direct_Move_Y but without touching.
(Compute_Funcs): Use new functions.
(Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid,
Round_Up_To_Grid, Round_To_Double_Grid, Round_Super,
Round_Super_45): Fix rounding of value zero.
(DO_DIV): Don't use TT_MULDIV.
(Ins_SHC): This instruction actually touches the points.
(Ins_MSIRP): Fix undocumented behaviour.
* src/truetype/ttinterp.h (TT_ExecContextRec): Updated.
* docs/VERSION.DLL: Updated.
* src/base/ftobjs.c (FT_Set_Char_Size): Make metrics->x_scale and
metrics->y_scale really precise.
(FT_Load_Glyph): Update computation of linearHoriAdvance and
linearVertAdvance.
* src/true/type/ttinterp.c (Update_Max): Use FT_REALLOC.
2003-11-24 23:54:58 +01:00
|
|
|
FT_UInt gindex,
|
2003-11-28 23:01:02 +01:00
|
|
|
FT_Pos *anadvance )
|
2002-10-31 09:30:19 +01:00
|
|
|
{
|
* src/pfr/pfrobjs.c, src/pfr/pfrobjs.h (pfr_face_init,
pfr_face_done, pfr_face_get_kerning, pfr_slot_init, pfr_slot_done,
pfr_slot_load): Don't use PFR_XXX but FT_XXX arguments which are
typecast to the proper PFR_XXX types within the function.
Update code accordingly.
* src/pfr/pfrdrivr.c (pfr_get_kerning, pfr_get_advance,
pfr_get_metrics, pfr_get_service): Don't use PFR_XXX but FT_XXX
arguments which are typecast to the proper PFR_XXX types within the
function.
Update code accordingly.
Use FT_CALLBACK_DEF throughout.
(pfr_metrics_service_rec, pfr_driver_class): Remove casts.
2004-05-08 09:00:23 +02:00
|
|
|
PFR_Face face = (PFR_Face)pfrface;
|
2013-03-14 17:50:49 +01:00
|
|
|
FT_Error error = FT_ERR( Invalid_Argument );
|
2003-04-23 16:14:06 +02:00
|
|
|
|
2002-10-31 09:30:19 +01:00
|
|
|
|
2003-11-28 23:01:02 +01:00
|
|
|
*anadvance = 0;
|
2008-07-16 23:03:40 +02:00
|
|
|
|
|
|
|
if ( !gindex )
|
|
|
|
goto Exit;
|
|
|
|
|
|
|
|
gindex--;
|
|
|
|
|
2002-10-31 09:30:19 +01:00
|
|
|
if ( face )
|
|
|
|
{
|
* src/truetype/ttinterp.c (CUR_Func_move_orig): New macro.
(Direct_Move_Orig, Direct_Move_Orig_X, Direct_Move_Orig_Y): New
functions. Similar to Direct_Move, Direct_Move_X, and
Direct_Move_Y but without touching.
(Compute_Funcs): Use new functions.
(Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid,
Round_Up_To_Grid, Round_To_Double_Grid, Round_Super,
Round_Super_45): Fix rounding of value zero.
(DO_DIV): Don't use TT_MULDIV.
(Ins_SHC): This instruction actually touches the points.
(Ins_MSIRP): Fix undocumented behaviour.
* src/truetype/ttinterp.h (TT_ExecContextRec): Updated.
* docs/VERSION.DLL: Updated.
* src/base/ftobjs.c (FT_Set_Char_Size): Make metrics->x_scale and
metrics->y_scale really precise.
(FT_Load_Glyph): Update computation of linearHoriAdvance and
linearVertAdvance.
* src/true/type/ttinterp.c (Update_Max): Use FT_REALLOC.
2003-11-24 23:54:58 +01:00
|
|
|
PFR_PhyFont phys = &face->phy_font;
|
2002-10-31 09:30:19 +01:00
|
|
|
|
2003-04-23 16:14:06 +02:00
|
|
|
|
2002-10-31 09:30:19 +01:00
|
|
|
if ( gindex < phys->num_chars )
|
|
|
|
{
|
2003-11-28 23:01:02 +01:00
|
|
|
*anadvance = phys->chars[gindex].advance;
|
2013-03-14 11:21:17 +01:00
|
|
|
error = FT_Err_Ok;
|
2002-10-31 09:30:19 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-07-16 23:03:40 +02:00
|
|
|
Exit:
|
2002-10-31 09:30:19 +01:00
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
* src/pfr/pfrobjs.c, src/pfr/pfrobjs.h (pfr_face_init,
pfr_face_done, pfr_face_get_kerning, pfr_slot_init, pfr_slot_done,
pfr_slot_load): Don't use PFR_XXX but FT_XXX arguments which are
typecast to the proper PFR_XXX types within the function.
Update code accordingly.
* src/pfr/pfrdrivr.c (pfr_get_kerning, pfr_get_advance,
pfr_get_metrics, pfr_get_service): Don't use PFR_XXX but FT_XXX
arguments which are typecast to the proper PFR_XXX types within the
function.
Update code accordingly.
Use FT_CALLBACK_DEF throughout.
(pfr_metrics_service_rec, pfr_driver_class): Remove casts.
2004-05-08 09:00:23 +02:00
|
|
|
FT_CALLBACK_DEF( FT_Error )
|
|
|
|
pfr_get_metrics( FT_Face pfrface, /* PFR_Face */
|
2003-11-28 23:01:02 +01:00
|
|
|
FT_UInt *anoutline_resolution,
|
2002-10-31 09:30:19 +01:00
|
|
|
FT_UInt *ametrics_resolution,
|
|
|
|
FT_Fixed *ametrics_x_scale,
|
|
|
|
FT_Fixed *ametrics_y_scale )
|
|
|
|
{
|
* src/pfr/pfrobjs.c, src/pfr/pfrobjs.h (pfr_face_init,
pfr_face_done, pfr_face_get_kerning, pfr_slot_init, pfr_slot_done,
pfr_slot_load): Don't use PFR_XXX but FT_XXX arguments which are
typecast to the proper PFR_XXX types within the function.
Update code accordingly.
* src/pfr/pfrdrivr.c (pfr_get_kerning, pfr_get_advance,
pfr_get_metrics, pfr_get_service): Don't use PFR_XXX but FT_XXX
arguments which are typecast to the proper PFR_XXX types within the
function.
Update code accordingly.
Use FT_CALLBACK_DEF throughout.
(pfr_metrics_service_rec, pfr_driver_class): Remove casts.
2004-05-08 09:00:23 +02:00
|
|
|
PFR_Face face = (PFR_Face)pfrface;
|
* src/truetype/ttinterp.c (CUR_Func_move_orig): New macro.
(Direct_Move_Orig, Direct_Move_Orig_X, Direct_Move_Orig_Y): New
functions. Similar to Direct_Move, Direct_Move_X, and
Direct_Move_Y but without touching.
(Compute_Funcs): Use new functions.
(Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid,
Round_Up_To_Grid, Round_To_Double_Grid, Round_Super,
Round_Super_45): Fix rounding of value zero.
(DO_DIV): Don't use TT_MULDIV.
(Ins_SHC): This instruction actually touches the points.
(Ins_MSIRP): Fix undocumented behaviour.
* src/truetype/ttinterp.h (TT_ExecContextRec): Updated.
* docs/VERSION.DLL: Updated.
* src/base/ftobjs.c (FT_Set_Char_Size): Make metrics->x_scale and
metrics->y_scale really precise.
(FT_Load_Glyph): Update computation of linearHoriAdvance and
linearVertAdvance.
* src/true/type/ttinterp.c (Update_Max): Use FT_REALLOC.
2003-11-24 23:54:58 +01:00
|
|
|
PFR_PhyFont phys = &face->phy_font;
|
2002-10-31 09:30:19 +01:00
|
|
|
FT_Fixed x_scale, y_scale;
|
|
|
|
FT_Size size = face->root.size;
|
|
|
|
|
2003-04-23 16:14:06 +02:00
|
|
|
|
2003-11-28 23:01:02 +01:00
|
|
|
if ( anoutline_resolution )
|
|
|
|
*anoutline_resolution = phys->outline_resolution;
|
2002-10-31 09:30:19 +01:00
|
|
|
|
|
|
|
if ( ametrics_resolution )
|
|
|
|
*ametrics_resolution = phys->metrics_resolution;
|
|
|
|
|
|
|
|
x_scale = 0x10000L;
|
|
|
|
y_scale = 0x10000L;
|
|
|
|
|
|
|
|
if ( size )
|
|
|
|
{
|
2003-11-27 22:01:24 +01:00
|
|
|
x_scale = FT_DivFix( size->metrics.x_ppem << 6,
|
2015-02-21 09:52:29 +01:00
|
|
|
(FT_Long)phys->metrics_resolution );
|
2003-11-27 22:01:24 +01:00
|
|
|
|
|
|
|
y_scale = FT_DivFix( size->metrics.y_ppem << 6,
|
2015-02-21 09:52:29 +01:00
|
|
|
(FT_Long)phys->metrics_resolution );
|
2002-10-31 09:30:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( ametrics_x_scale )
|
|
|
|
*ametrics_x_scale = x_scale;
|
|
|
|
|
|
|
|
if ( ametrics_y_scale )
|
|
|
|
*ametrics_y_scale = y_scale;
|
2002-11-06 23:32:54 +01:00
|
|
|
|
2013-03-14 11:21:17 +01:00
|
|
|
return FT_Err_Ok;
|
2002-10-31 09:30:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-03-18 08:39:35 +01:00
|
|
|
static
|
* include/freetype/internal/fnttypes.h,
include/freetype/internal/ftserv.h, src/base/ftbdf.c, src/base/ftmm.c,
src/base/ftobjs.c, src/base/ftpfr.c, src/base/ftwinfnt.c,
src/base/ftxf86.c, src/pfr/pfrdrivr.c, src/winfonts/winfnt.c,
src/winfonts/winfnt.h, include/freetype/internal/service/svwinfnt.h,:
simplification of service lookup macros, updating the PFR and
WINFNT font drivers to new services
2003-09-21 19:15:55 +02:00
|
|
|
const FT_Service_PfrMetricsRec pfr_metrics_service_rec =
|
2002-10-31 09:30:19 +01:00
|
|
|
{
|
* src/pfr/pfrobjs.c, src/pfr/pfrobjs.h (pfr_face_init,
pfr_face_done, pfr_face_get_kerning, pfr_slot_init, pfr_slot_done,
pfr_slot_load): Don't use PFR_XXX but FT_XXX arguments which are
typecast to the proper PFR_XXX types within the function.
Update code accordingly.
* src/pfr/pfrdrivr.c (pfr_get_kerning, pfr_get_advance,
pfr_get_metrics, pfr_get_service): Don't use PFR_XXX but FT_XXX
arguments which are typecast to the proper PFR_XXX types within the
function.
Update code accordingly.
Use FT_CALLBACK_DEF throughout.
(pfr_metrics_service_rec, pfr_driver_class): Remove casts.
2004-05-08 09:00:23 +02:00
|
|
|
pfr_get_metrics,
|
|
|
|
pfr_face_get_kerning,
|
|
|
|
pfr_get_advance
|
2002-10-31 09:30:19 +01:00
|
|
|
};
|
|
|
|
|
* src/truetype/ttinterp.c (CUR_Func_move_orig): New macro.
(Direct_Move_Orig, Direct_Move_Orig_X, Direct_Move_Orig_Y): New
functions. Similar to Direct_Move, Direct_Move_X, and
Direct_Move_Y but without touching.
(Compute_Funcs): Use new functions.
(Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid,
Round_Up_To_Grid, Round_To_Double_Grid, Round_Super,
Round_Super_45): Fix rounding of value zero.
(DO_DIV): Don't use TT_MULDIV.
(Ins_SHC): This instruction actually touches the points.
(Ins_MSIRP): Fix undocumented behaviour.
* src/truetype/ttinterp.h (TT_ExecContextRec): Updated.
* docs/VERSION.DLL: Updated.
* src/base/ftobjs.c (FT_Set_Char_Size): Make metrics->x_scale and
metrics->y_scale really precise.
(FT_Load_Glyph): Update computation of linearHoriAdvance and
linearVertAdvance.
* src/true/type/ttinterp.c (Update_Max): Use FT_REALLOC.
2003-11-24 23:54:58 +01:00
|
|
|
|
* include/freetype/internal/fnttypes.h,
include/freetype/internal/ftserv.h, src/base/ftbdf.c, src/base/ftmm.c,
src/base/ftobjs.c, src/base/ftpfr.c, src/base/ftwinfnt.c,
src/base/ftxf86.c, src/pfr/pfrdrivr.c, src/winfonts/winfnt.c,
src/winfonts/winfnt.h, include/freetype/internal/service/svwinfnt.h,:
simplification of service lookup macros, updating the PFR and
WINFNT font drivers to new services
2003-09-21 19:15:55 +02:00
|
|
|
/*
|
|
|
|
* SERVICE LIST
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
static const FT_ServiceDescRec pfr_services[] =
|
|
|
|
{
|
* src/truetype/ttinterp.c (CUR_Func_move_orig): New macro.
(Direct_Move_Orig, Direct_Move_Orig_X, Direct_Move_Orig_Y): New
functions. Similar to Direct_Move, Direct_Move_X, and
Direct_Move_Y but without touching.
(Compute_Funcs): Use new functions.
(Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid,
Round_Up_To_Grid, Round_To_Double_Grid, Round_Super,
Round_Super_45): Fix rounding of value zero.
(DO_DIV): Don't use TT_MULDIV.
(Ins_SHC): This instruction actually touches the points.
(Ins_MSIRP): Fix undocumented behaviour.
* src/truetype/ttinterp.h (TT_ExecContextRec): Updated.
* docs/VERSION.DLL: Updated.
* src/base/ftobjs.c (FT_Set_Char_Size): Make metrics->x_scale and
metrics->y_scale really precise.
(FT_Load_Glyph): Update computation of linearHoriAdvance and
linearVertAdvance.
* src/true/type/ttinterp.c (Update_Max): Use FT_REALLOC.
2003-11-24 23:54:58 +01:00
|
|
|
{ FT_SERVICE_ID_PFR_METRICS, &pfr_metrics_service_rec },
|
2003-10-23 06:54:14 +02:00
|
|
|
{ FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_PFR },
|
* include/freetype/internal/fnttypes.h,
include/freetype/internal/ftserv.h, src/base/ftbdf.c, src/base/ftmm.c,
src/base/ftobjs.c, src/base/ftpfr.c, src/base/ftwinfnt.c,
src/base/ftxf86.c, src/pfr/pfrdrivr.c, src/winfonts/winfnt.c,
src/winfonts/winfnt.h, include/freetype/internal/service/svwinfnt.h,:
simplification of service lookup macros, updating the PFR and
WINFNT font drivers to new services
2003-09-21 19:15:55 +02:00
|
|
|
{ NULL, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
* src/pfr/pfrobjs.c, src/pfr/pfrobjs.h (pfr_face_init,
pfr_face_done, pfr_face_get_kerning, pfr_slot_init, pfr_slot_done,
pfr_slot_load): Don't use PFR_XXX but FT_XXX arguments which are
typecast to the proper PFR_XXX types within the function.
Update code accordingly.
* src/pfr/pfrdrivr.c (pfr_get_kerning, pfr_get_advance,
pfr_get_metrics, pfr_get_service): Don't use PFR_XXX but FT_XXX
arguments which are typecast to the proper PFR_XXX types within the
function.
Update code accordingly.
Use FT_CALLBACK_DEF throughout.
(pfr_metrics_service_rec, pfr_driver_class): Remove casts.
2004-05-08 09:00:23 +02:00
|
|
|
FT_CALLBACK_DEF( FT_Module_Interface )
|
|
|
|
pfr_get_service( FT_Module module,
|
* include/freetype/internal/fnttypes.h,
include/freetype/internal/ftserv.h, src/base/ftbdf.c, src/base/ftmm.c,
src/base/ftobjs.c, src/base/ftpfr.c, src/base/ftwinfnt.c,
src/base/ftxf86.c, src/pfr/pfrdrivr.c, src/winfonts/winfnt.c,
src/winfonts/winfnt.h, include/freetype/internal/service/svwinfnt.h,:
simplification of service lookup macros, updating the PFR and
WINFNT font drivers to new services
2003-09-21 19:15:55 +02:00
|
|
|
const FT_String* service_id )
|
|
|
|
{
|
* src/pfr/pfrobjs.c, src/pfr/pfrobjs.h (pfr_face_init,
pfr_face_done, pfr_face_get_kerning, pfr_slot_init, pfr_slot_done,
pfr_slot_load): Don't use PFR_XXX but FT_XXX arguments which are
typecast to the proper PFR_XXX types within the function.
Update code accordingly.
* src/pfr/pfrdrivr.c (pfr_get_kerning, pfr_get_advance,
pfr_get_metrics, pfr_get_service): Don't use PFR_XXX but FT_XXX
arguments which are typecast to the proper PFR_XXX types within the
function.
Update code accordingly.
Use FT_CALLBACK_DEF throughout.
(pfr_metrics_service_rec, pfr_driver_class): Remove casts.
2004-05-08 09:00:23 +02:00
|
|
|
FT_UNUSED( module );
|
* include/freetype/internal/fnttypes.h,
include/freetype/internal/ftserv.h, src/base/ftbdf.c, src/base/ftmm.c,
src/base/ftobjs.c, src/base/ftpfr.c, src/base/ftwinfnt.c,
src/base/ftxf86.c, src/pfr/pfrdrivr.c, src/winfonts/winfnt.c,
src/winfonts/winfnt.h, include/freetype/internal/service/svwinfnt.h,:
simplification of service lookup macros, updating the PFR and
WINFNT font drivers to new services
2003-09-21 19:15:55 +02:00
|
|
|
|
|
|
|
return ft_service_list_lookup( pfr_services, service_id );
|
|
|
|
}
|
|
|
|
|
2002-10-31 09:30:19 +01:00
|
|
|
|
2002-04-19 17:13:47 +02:00
|
|
|
FT_CALLBACK_TABLE_DEF
|
|
|
|
const FT_Driver_ClassRec pfr_driver_class =
|
|
|
|
{
|
|
|
|
{
|
* 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.
2003-06-17 12:42:27 +02:00
|
|
|
FT_MODULE_FONT_DRIVER |
|
|
|
|
FT_MODULE_DRIVER_SCALABLE,
|
2002-04-19 17:13:47 +02:00
|
|
|
|
2011-11-30 10:46:53 +01:00
|
|
|
sizeof ( FT_DriverRec ),
|
2002-04-19 17:13:47 +02:00
|
|
|
|
|
|
|
"pfr",
|
|
|
|
0x10000L,
|
|
|
|
0x20000L,
|
|
|
|
|
* include/freetype/internal/fnttypes.h,
include/freetype/internal/ftserv.h, src/base/ftbdf.c, src/base/ftmm.c,
src/base/ftobjs.c, src/base/ftpfr.c, src/base/ftwinfnt.c,
src/base/ftxf86.c, src/pfr/pfrdrivr.c, src/winfonts/winfnt.c,
src/winfonts/winfnt.h, include/freetype/internal/service/svwinfnt.h,:
simplification of service lookup macros, updating the PFR and
WINFNT font drivers to new services
2003-09-21 19:15:55 +02:00
|
|
|
NULL,
|
2002-04-19 17:13:47 +02:00
|
|
|
|
2011-11-30 13:10:54 +01:00
|
|
|
0, /* FT_Module_Constructor */
|
|
|
|
0, /* FT_Module_Destructor */
|
* src/pfr/pfrobjs.c, src/pfr/pfrobjs.h (pfr_face_init,
pfr_face_done, pfr_face_get_kerning, pfr_slot_init, pfr_slot_done,
pfr_slot_load): Don't use PFR_XXX but FT_XXX arguments which are
typecast to the proper PFR_XXX types within the function.
Update code accordingly.
* src/pfr/pfrdrivr.c (pfr_get_kerning, pfr_get_advance,
pfr_get_metrics, pfr_get_service): Don't use PFR_XXX but FT_XXX
arguments which are typecast to the proper PFR_XXX types within the
function.
Update code accordingly.
Use FT_CALLBACK_DEF throughout.
(pfr_metrics_service_rec, pfr_driver_class): Remove casts.
2004-05-08 09:00:23 +02:00
|
|
|
pfr_get_service
|
2002-04-19 17:13:47 +02:00
|
|
|
},
|
|
|
|
|
2011-11-30 10:46:53 +01:00
|
|
|
sizeof ( PFR_FaceRec ),
|
|
|
|
sizeof ( PFR_SizeRec ),
|
|
|
|
sizeof ( PFR_SlotRec ),
|
2002-04-19 17:13:47 +02:00
|
|
|
|
* src/pfr/pfrobjs.c, src/pfr/pfrobjs.h (pfr_face_init,
pfr_face_done, pfr_face_get_kerning, pfr_slot_init, pfr_slot_done,
pfr_slot_load): Don't use PFR_XXX but FT_XXX arguments which are
typecast to the proper PFR_XXX types within the function.
Update code accordingly.
* src/pfr/pfrdrivr.c (pfr_get_kerning, pfr_get_advance,
pfr_get_metrics, pfr_get_service): Don't use PFR_XXX but FT_XXX
arguments which are typecast to the proper PFR_XXX types within the
function.
Update code accordingly.
Use FT_CALLBACK_DEF throughout.
(pfr_metrics_service_rec, pfr_driver_class): Remove casts.
2004-05-08 09:00:23 +02:00
|
|
|
pfr_face_init,
|
|
|
|
pfr_face_done,
|
|
|
|
0, /* FT_Size_InitFunc */
|
|
|
|
0, /* FT_Size_DoneFunc */
|
|
|
|
pfr_slot_init,
|
|
|
|
pfr_slot_done,
|
2002-04-19 17:13:47 +02:00
|
|
|
|
* src/pfr/pfrobjs.c, src/pfr/pfrobjs.h (pfr_face_init,
pfr_face_done, pfr_face_get_kerning, pfr_slot_init, pfr_slot_done,
pfr_slot_load): Don't use PFR_XXX but FT_XXX arguments which are
typecast to the proper PFR_XXX types within the function.
Update code accordingly.
* src/pfr/pfrdrivr.c (pfr_get_kerning, pfr_get_advance,
pfr_get_metrics, pfr_get_service): Don't use PFR_XXX but FT_XXX
arguments which are typecast to the proper PFR_XXX types within the
function.
Update code accordingly.
Use FT_CALLBACK_DEF throughout.
(pfr_metrics_service_rec, pfr_driver_class): Remove casts.
2004-05-08 09:00:23 +02:00
|
|
|
pfr_slot_load,
|
2002-04-19 17:13:47 +02:00
|
|
|
|
* src/pfr/pfrobjs.c, src/pfr/pfrobjs.h (pfr_face_init,
pfr_face_done, pfr_face_get_kerning, pfr_slot_init, pfr_slot_done,
pfr_slot_load): Don't use PFR_XXX but FT_XXX arguments which are
typecast to the proper PFR_XXX types within the function.
Update code accordingly.
* src/pfr/pfrdrivr.c (pfr_get_kerning, pfr_get_advance,
pfr_get_metrics, pfr_get_service): Don't use PFR_XXX but FT_XXX
arguments which are typecast to the proper PFR_XXX types within the
function.
Update code accordingly.
Use FT_CALLBACK_DEF throughout.
(pfr_metrics_service_rec, pfr_driver_class): Remove casts.
2004-05-08 09:00:23 +02:00
|
|
|
pfr_get_kerning,
|
|
|
|
0, /* FT_Face_AttachFunc */
|
2011-11-30 10:46:53 +01:00
|
|
|
0, /* FT_Face_GetAdvancesFunc */
|
|
|
|
0, /* FT_Size_RequestFunc */
|
|
|
|
0, /* FT_Size_SelectFunc */
|
2002-04-19 17:13:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2002-04-20 07:38:33 +02:00
|
|
|
/* END */
|