< prev index next >
src/java.desktop/share/native/libfreetype/src/sfnt/ttmtx.c
Print this page
*** 1,21 ****
! /***************************************************************************/
! /* */
! /* ttmtx.c */
! /* */
! /* Load the metrics tables common to TTF and OTF fonts (body). */
! /* */
! /* Copyright 2006-2018 by */
! /* 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. */
! /* */
! /***************************************************************************/
#include <ft2build.h>
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
--- 1,21 ----
! /****************************************************************************
! *
! * ttmtx.c
! *
! * Load the metrics tables common to TTF and OTF fonts (body).
! *
! * Copyright (C) 2006-2019 by
! * 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.
! *
! */
#include <ft2build.h>
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
*** 36,73 ****
/* */
/* This ensures that `tt_face_load_hmtx' is able to read */
/* both the horizontal and vertical headers. */
! /*************************************************************************/
! /* */
! /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
! /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
! /* messages during execution. */
! /* */
#undef FT_COMPONENT
! #define FT_COMPONENT trace_ttmtx
! /*************************************************************************/
! /* */
! /* <Function> */
! /* tt_face_load_hmtx */
! /* */
! /* <Description> */
! /* Load the `hmtx' or `vmtx' table into a face object. */
! /* */
! /* <Input> */
! /* face :: A handle to the target face object. */
! /* */
! /* stream :: The input stream. */
! /* */
! /* vertical :: A boolean flag. If set, load `vmtx'. */
! /* */
! /* <Return> */
! /* FreeType error code. 0 means success. */
! /* */
FT_LOCAL_DEF( FT_Error )
tt_face_load_hmtx( TT_Face face,
FT_Stream stream,
FT_Bool vertical )
{
--- 36,76 ----
/* */
/* This ensures that `tt_face_load_hmtx' is able to read */
/* both the horizontal and vertical headers. */
! /**************************************************************************
! *
! * The macro FT_COMPONENT is used in trace mode. It is an implicit
! * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
! * messages during execution.
! */
#undef FT_COMPONENT
! #define FT_COMPONENT ttmtx
! /**************************************************************************
! *
! * @Function:
! * tt_face_load_hmtx
! *
! * @Description:
! * Load the `hmtx' or `vmtx' table into a face object.
! *
! * @Input:
! * face ::
! * A handle to the target face object.
! *
! * stream ::
! * The input stream.
! *
! * vertical ::
! * A boolean flag. If set, load `vmtx'.
! *
! * @Return:
! * FreeType error code. 0 means success.
! */
FT_LOCAL_DEF( FT_Error )
tt_face_load_hmtx( TT_Face face,
FT_Stream stream,
FT_Bool vertical )
{
*** 100,127 ****
Fail:
return error;
}
! /*************************************************************************/
! /* */
! /* <Function> */
! /* tt_face_load_hhea */
! /* */
! /* <Description> */
! /* Load the `hhea' or 'vhea' table into a face object. */
! /* */
! /* <Input> */
! /* face :: A handle to the target face object. */
! /* */
! /* stream :: The input stream. */
! /* */
! /* vertical :: A boolean flag. If set, load `vhea'. */
! /* */
! /* <Return> */
! /* FreeType error code. 0 means success. */
! /* */
FT_LOCAL_DEF( FT_Error )
tt_face_load_hhea( TT_Face face,
FT_Stream stream,
FT_Bool vertical )
{
--- 103,133 ----
Fail:
return error;
}
! /**************************************************************************
! *
! * @Function:
! * tt_face_load_hhea
! *
! * @Description:
! * Load the `hhea' or 'vhea' table into a face object.
! *
! * @Input:
! * face ::
! * A handle to the target face object.
! *
! * stream ::
! * The input stream.
! *
! * vertical ::
! * A boolean flag. If set, load `vhea'.
! *
! * @Return:
! * FreeType error code. 0 means success.
! */
FT_LOCAL_DEF( FT_Error )
tt_face_load_hhea( TT_Face face,
FT_Stream stream,
FT_Bool vertical )
{
*** 188,221 ****
Fail:
return error;
}
! /*************************************************************************/
! /* */
! /* <Function> */
! /* tt_face_get_metrics */
! /* */
! /* <Description> */
! /* Return the horizontal or vertical metrics in font units for a */
! /* given glyph. The values are the left side bearing (top side */
! /* bearing for vertical metrics) and advance width (advance height */
! /* for vertical metrics). */
! /* */
! /* <Input> */
! /* face :: A pointer to the TrueType face structure. */
! /* */
! /* vertical :: If set to TRUE, get vertical metrics. */
! /* */
! /* gindex :: The glyph index. */
! /* */
! /* <Output> */
! /* abearing :: The bearing, either left side or top side. */
! /* */
! /* aadvance :: The advance width or advance height, depending on */
! /* the `vertical' flag. */
! /* */
FT_LOCAL_DEF( void )
tt_face_get_metrics( TT_Face face,
FT_Bool vertical,
FT_UInt gindex,
FT_Short *abearing,
--- 194,232 ----
Fail:
return error;
}
! /**************************************************************************
! *
! * @Function:
! * tt_face_get_metrics
! *
! * @Description:
! * Return the horizontal or vertical metrics in font units for a
! * given glyph. The values are the left side bearing (top side
! * bearing for vertical metrics) and advance width (advance height
! * for vertical metrics).
! *
! * @Input:
! * face ::
! * A pointer to the TrueType face structure.
! *
! * vertical ::
! * If set to TRUE, get vertical metrics.
! *
! * gindex ::
! * The glyph index.
! *
! * @Output:
! * abearing ::
! * The bearing, either left side or top side.
! *
! * aadvance ::
! * The advance width or advance height, depending on
! * the `vertical' flag.
! */
FT_LOCAL_DEF( void )
tt_face_get_metrics( TT_Face face,
FT_Bool vertical,
FT_UInt gindex,
FT_Short *abearing,
< prev index next >