vrshoot
diff libs/ft2static/freetype/ftsizes.h @ 0:b2f14e535253
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 01 Feb 2014 19:58:19 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/libs/ft2static/freetype/ftsizes.h Sat Feb 01 19:58:19 2014 +0200 1.3 @@ -0,0 +1,159 @@ 1.4 +/***************************************************************************/ 1.5 +/* */ 1.6 +/* ftsizes.h */ 1.7 +/* */ 1.8 +/* FreeType size objects management (specification). */ 1.9 +/* */ 1.10 +/* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */ 1.11 +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ 1.12 +/* */ 1.13 +/* This file is part of the FreeType project, and may only be used, */ 1.14 +/* modified, and distributed under the terms of the FreeType project */ 1.15 +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 1.16 +/* this file you indicate that you have read the license and */ 1.17 +/* understand and accept it fully. */ 1.18 +/* */ 1.19 +/***************************************************************************/ 1.20 + 1.21 + 1.22 + /*************************************************************************/ 1.23 + /* */ 1.24 + /* Typical application would normally not need to use these functions. */ 1.25 + /* However, they have been placed in a public API for the rare cases */ 1.26 + /* where they are needed. */ 1.27 + /* */ 1.28 + /*************************************************************************/ 1.29 + 1.30 + 1.31 +#ifndef __FTSIZES_H__ 1.32 +#define __FTSIZES_H__ 1.33 + 1.34 + 1.35 +#include <ft2build.h> 1.36 +#include FT_FREETYPE_H 1.37 + 1.38 +#ifdef FREETYPE_H 1.39 +#error "freetype.h of FreeType 1 has been loaded!" 1.40 +#error "Please fix the directory search order for header files" 1.41 +#error "so that freetype.h of FreeType 2 is found first." 1.42 +#endif 1.43 + 1.44 + 1.45 +FT_BEGIN_HEADER 1.46 + 1.47 + 1.48 + /*************************************************************************/ 1.49 + /* */ 1.50 + /* <Section> */ 1.51 + /* sizes_management */ 1.52 + /* */ 1.53 + /* <Title> */ 1.54 + /* Size Management */ 1.55 + /* */ 1.56 + /* <Abstract> */ 1.57 + /* Managing multiple sizes per face. */ 1.58 + /* */ 1.59 + /* <Description> */ 1.60 + /* When creating a new face object (e.g., with @FT_New_Face), an */ 1.61 + /* @FT_Size object is automatically created and used to store all */ 1.62 + /* pixel-size dependent information, available in the `face->size' */ 1.63 + /* field. */ 1.64 + /* */ 1.65 + /* It is however possible to create more sizes for a given face, */ 1.66 + /* mostly in order to manage several character pixel sizes of the */ 1.67 + /* same font family and style. See @FT_New_Size and @FT_Done_Size. */ 1.68 + /* */ 1.69 + /* Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only */ 1.70 + /* modify the contents of the current `active' size; you thus need */ 1.71 + /* to use @FT_Activate_Size to change it. */ 1.72 + /* */ 1.73 + /* 99% of applications won't need the functions provided here, */ 1.74 + /* especially if they use the caching sub-system, so be cautious */ 1.75 + /* when using these. */ 1.76 + /* */ 1.77 + /*************************************************************************/ 1.78 + 1.79 + 1.80 + /*************************************************************************/ 1.81 + /* */ 1.82 + /* <Function> */ 1.83 + /* FT_New_Size */ 1.84 + /* */ 1.85 + /* <Description> */ 1.86 + /* Create a new size object from a given face object. */ 1.87 + /* */ 1.88 + /* <Input> */ 1.89 + /* face :: A handle to a parent face object. */ 1.90 + /* */ 1.91 + /* <Output> */ 1.92 + /* asize :: A handle to a new size object. */ 1.93 + /* */ 1.94 + /* <Return> */ 1.95 + /* FreeType error code. 0~means success. */ 1.96 + /* */ 1.97 + /* <Note> */ 1.98 + /* You need to call @FT_Activate_Size in order to select the new size */ 1.99 + /* for upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size, */ 1.100 + /* @FT_Load_Glyph, @FT_Load_Char, etc. */ 1.101 + /* */ 1.102 + FT_EXPORT( FT_Error ) 1.103 + FT_New_Size( FT_Face face, 1.104 + FT_Size* size ); 1.105 + 1.106 + 1.107 + /*************************************************************************/ 1.108 + /* */ 1.109 + /* <Function> */ 1.110 + /* FT_Done_Size */ 1.111 + /* */ 1.112 + /* <Description> */ 1.113 + /* Discard a given size object. Note that @FT_Done_Face */ 1.114 + /* automatically discards all size objects allocated with */ 1.115 + /* @FT_New_Size. */ 1.116 + /* */ 1.117 + /* <Input> */ 1.118 + /* size :: A handle to a target size object. */ 1.119 + /* */ 1.120 + /* <Return> */ 1.121 + /* FreeType error code. 0~means success. */ 1.122 + /* */ 1.123 + FT_EXPORT( FT_Error ) 1.124 + FT_Done_Size( FT_Size size ); 1.125 + 1.126 + 1.127 + /*************************************************************************/ 1.128 + /* */ 1.129 + /* <Function> */ 1.130 + /* FT_Activate_Size */ 1.131 + /* */ 1.132 + /* <Description> */ 1.133 + /* Even though it is possible to create several size objects for a */ 1.134 + /* given face (see @FT_New_Size for details), functions like */ 1.135 + /* @FT_Load_Glyph or @FT_Load_Char only use the one which has been */ 1.136 + /* activated last to determine the `current character pixel size'. */ 1.137 + /* */ 1.138 + /* This function can be used to `activate' a previously created size */ 1.139 + /* object. */ 1.140 + /* */ 1.141 + /* <Input> */ 1.142 + /* size :: A handle to a target size object. */ 1.143 + /* */ 1.144 + /* <Return> */ 1.145 + /* FreeType error code. 0~means success. */ 1.146 + /* */ 1.147 + /* <Note> */ 1.148 + /* If `face' is the size's parent face object, this function changes */ 1.149 + /* the value of `face->size' to the input size handle. */ 1.150 + /* */ 1.151 + FT_EXPORT( FT_Error ) 1.152 + FT_Activate_Size( FT_Size size ); 1.153 + 1.154 + /* */ 1.155 + 1.156 + 1.157 +FT_END_HEADER 1.158 + 1.159 +#endif /* __FTSIZES_H__ */ 1.160 + 1.161 + 1.162 +/* END */