3 <html lang="en" class="no-js">
7 <meta name="viewport" content="width=device-width,initial-scale=1">
9 <meta name="description" content="API Reference Documentation for FreeType-2.13.2">
13 <meta name="author" content="FreeType Contributors">
16 <link rel="icon" href="images/favico.ico">
17 <meta name="generator" content="mkdocs-1.4.3, mkdocs-material-7.1.9">
21 <title>Information Retrieval - FreeType-2.13.2 API Reference</title>
25 <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css">
28 <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css">
32 <meta name="theme-color" content="#4cae4f">
40 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
41 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback">
42 <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style>
47 <link rel="stylesheet" href="stylesheets/extra.css">
63 <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green">
66 <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
68 <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
69 <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
70 <label class="md-overlay" for="__drawer"></label>
71 <div data-md-component="skip">
74 <a href="#information-retrieval" class="md-skip">
79 <div data-md-component="announce">
83 <header class="md-header" data-md-component="header">
84 <nav class="md-header__inner md-grid" aria-label="Header">
85 <a href="index.html" title="FreeType-2.13.2 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.13.2 API Reference" data-md-component="logo">
87 <img src="images/favico.ico" alt="logo">
90 <label class="md-header__button md-icon" for="__drawer">
91 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
93 <div class="md-header__title" data-md-component="header-title">
94 <div class="md-header__ellipsis">
95 <div class="md-header__topic">
96 <span class="md-ellipsis">
97 FreeType-2.13.2 API Reference
100 <div class="md-header__topic" data-md-component="header-topic">
101 <span class="md-ellipsis">
103 Information Retrieval
112 <label class="md-header__button md-icon" for="__search">
113 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
116 <div class="md-search" data-md-component="search" role="dialog">
117 <label class="md-search__overlay" for="__search"></label>
118 <div class="md-search__inner" role="search">
119 <form class="md-search__form" name="search">
120 <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
121 <label class="md-search__icon md-icon" for="__search">
122 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
123 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
125 <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
126 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
129 <div class="md-search__output">
130 <div class="md-search__scrollwrap" data-md-scrollfix>
131 <div class="md-search-result" data-md-component="search-result">
132 <div class="md-search-result__meta">
135 <ol class="md-search-result__list"></ol>
146 <div class="md-container" data-md-component="container">
151 <main class="md-main" data-md-component="main">
152 <div class="md-main__inner md-grid">
156 <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
157 <div class="md-sidebar__scrollwrap">
158 <div class="md-sidebar__inner">
162 <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
163 <label class="md-nav__title" for="__drawer">
164 <a href="index.html" title="FreeType-2.13.2 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.13.2 API Reference" data-md-component="logo">
166 <img src="images/favico.ico" alt="logo">
169 FreeType-2.13.2 API Reference
172 <ul class="md-nav__list" data-md-scrollfix>
181 <li class="md-nav__item">
182 <a href="index.html" class="md-nav__link">
196 <li class="md-nav__item">
197 <a href="ft2-index.html" class="md-nav__link">
212 <li class="md-nav__item md-nav__item--nested">
215 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" >
217 <label class="md-nav__link" for="__nav_3">
219 <span class="md-nav__icon md-icon"></span>
221 <nav class="md-nav" aria-label="General Remarks" data-md-level="1">
222 <label class="md-nav__title" for="__nav_3">
223 <span class="md-nav__icon md-icon"></span>
226 <ul class="md-nav__list" data-md-scrollfix>
232 <li class="md-nav__item">
233 <a href="ft2-preamble.html" class="md-nav__link">
244 <li class="md-nav__item">
245 <a href="ft2-header_inclusion.html" class="md-nav__link">
246 FreeType's header inclusion scheme
256 <li class="md-nav__item">
257 <a href="ft2-user_allocation.html" class="md-nav__link">
280 <li class="md-nav__item md-nav__item--active md-nav__item--nested">
283 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" checked>
285 <label class="md-nav__link" for="__nav_4">
287 <span class="md-nav__icon md-icon"></span>
289 <nav class="md-nav" aria-label="Core API" data-md-level="1">
290 <label class="md-nav__title" for="__nav_4">
291 <span class="md-nav__icon md-icon"></span>
294 <ul class="md-nav__list" data-md-scrollfix>
300 <li class="md-nav__item">
301 <a href="ft2-basic_types.html" class="md-nav__link">
312 <li class="md-nav__item">
313 <a href="ft2-library_setup.html" class="md-nav__link">
324 <li class="md-nav__item">
325 <a href="ft2-face_creation.html" class="md-nav__link">
336 <li class="md-nav__item">
337 <a href="ft2-font_testing_macros.html" class="md-nav__link">
348 <li class="md-nav__item">
349 <a href="ft2-sizing_and_scaling.html" class="md-nav__link">
360 <li class="md-nav__item">
361 <a href="ft2-glyph_retrieval.html" class="md-nav__link">
372 <li class="md-nav__item">
373 <a href="ft2-character_mapping.html" class="md-nav__link">
386 <li class="md-nav__item md-nav__item--active">
388 <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
394 <label class="md-nav__link md-nav__link--active" for="__toc">
395 Information Retrieval
396 <span class="md-nav__icon md-icon"></span>
399 <a href="ft2-information_retrieval.html" class="md-nav__link md-nav__link--active">
400 Information Retrieval
404 <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
411 <label class="md-nav__title" for="__toc">
412 <span class="md-nav__icon md-icon"></span>
415 <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
417 <li class="md-nav__item">
418 <a href="#synopsis" class="md-nav__link">
424 <li class="md-nav__item">
425 <a href="#ft_get_name_index" class="md-nav__link">
431 <li class="md-nav__item">
432 <a href="#ft_get_glyph_name" class="md-nav__link">
438 <li class="md-nav__item">
439 <a href="#ft_get_postscript_name" class="md-nav__link">
440 FT_Get_Postscript_Name
445 <li class="md-nav__item">
446 <a href="#ft_get_fstype_flags" class="md-nav__link">
452 <li class="md-nav__item">
453 <a href="#ft_fstype_xxx" class="md-nav__link">
459 <li class="md-nav__item">
460 <a href="#ft_get_subglyph_info" class="md-nav__link">
466 <li class="md-nav__item">
467 <a href="#ft_subglyph_flag_xxx" class="md-nav__link">
485 <li class="md-nav__item">
486 <a href="ft2-other_api_data.html" class="md-nav__link">
507 <li class="md-nav__item md-nav__item--nested">
510 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" >
512 <label class="md-nav__link" for="__nav_5">
514 <span class="md-nav__icon md-icon"></span>
516 <nav class="md-nav" aria-label="Extended API" data-md-level="1">
517 <label class="md-nav__title" for="__nav_5">
518 <span class="md-nav__icon md-icon"></span>
521 <ul class="md-nav__list" data-md-scrollfix>
527 <li class="md-nav__item">
528 <a href="ft2-glyph_variants.html" class="md-nav__link">
529 Unicode Variation Sequences
539 <li class="md-nav__item">
540 <a href="ft2-color_management.html" class="md-nav__link">
541 Glyph Color Management
551 <li class="md-nav__item">
552 <a href="ft2-layer_management.html" class="md-nav__link">
553 Glyph Layer Management
563 <li class="md-nav__item">
564 <a href="ft2-glyph_management.html" class="md-nav__link">
575 <li class="md-nav__item">
576 <a href="ft2-mac_specific.html" class="md-nav__link">
577 Mac Specific Interface
587 <li class="md-nav__item">
588 <a href="ft2-sizes_management.html" class="md-nav__link">
599 <li class="md-nav__item">
600 <a href="ft2-header_file_macros.html" class="md-nav__link">
621 <li class="md-nav__item md-nav__item--nested">
624 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" >
626 <label class="md-nav__link" for="__nav_6">
628 <span class="md-nav__icon md-icon"></span>
630 <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1">
631 <label class="md-nav__title" for="__nav_6">
632 <span class="md-nav__icon md-icon"></span>
635 <ul class="md-nav__list" data-md-scrollfix>
641 <li class="md-nav__item">
642 <a href="ft2-multiple_masters.html" class="md-nav__link">
653 <li class="md-nav__item">
654 <a href="ft2-truetype_tables.html" class="md-nav__link">
665 <li class="md-nav__item">
666 <a href="ft2-type1_tables.html" class="md-nav__link">
677 <li class="md-nav__item">
678 <a href="ft2-sfnt_names.html" class="md-nav__link">
689 <li class="md-nav__item">
690 <a href="ft2-bdf_fonts.html" class="md-nav__link">
701 <li class="md-nav__item">
702 <a href="ft2-cid_fonts.html" class="md-nav__link">
713 <li class="md-nav__item">
714 <a href="ft2-pfr_fonts.html" class="md-nav__link">
725 <li class="md-nav__item">
726 <a href="ft2-winfnt_fonts.html" class="md-nav__link">
737 <li class="md-nav__item">
738 <a href="ft2-svg_fonts.html" class="md-nav__link">
749 <li class="md-nav__item">
750 <a href="ft2-font_formats.html" class="md-nav__link">
761 <li class="md-nav__item">
762 <a href="ft2-gasp_table.html" class="md-nav__link">
783 <li class="md-nav__item md-nav__item--nested">
786 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" >
788 <label class="md-nav__link" for="__nav_7">
789 Controlling FreeType Modules
790 <span class="md-nav__icon md-icon"></span>
792 <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1">
793 <label class="md-nav__title" for="__nav_7">
794 <span class="md-nav__icon md-icon"></span>
795 Controlling FreeType Modules
797 <ul class="md-nav__list" data-md-scrollfix>
803 <li class="md-nav__item">
804 <a href="ft2-auto_hinter.html" class="md-nav__link">
815 <li class="md-nav__item">
816 <a href="ft2-cff_driver.html" class="md-nav__link">
827 <li class="md-nav__item">
828 <a href="ft2-t1_cid_driver.html" class="md-nav__link">
829 The Type 1 and CID drivers
839 <li class="md-nav__item">
840 <a href="ft2-tt_driver.html" class="md-nav__link">
851 <li class="md-nav__item">
852 <a href="ft2-pcf_driver.html" class="md-nav__link">
863 <li class="md-nav__item">
864 <a href="ft2-ot_svg_driver.html" class="md-nav__link">
875 <li class="md-nav__item">
876 <a href="ft2-properties.html" class="md-nav__link">
887 <li class="md-nav__item">
888 <a href="ft2-parameter_tags.html" class="md-nav__link">
899 <li class="md-nav__item">
900 <a href="ft2-lcd_rendering.html" class="md-nav__link">
921 <li class="md-nav__item md-nav__item--nested">
924 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" >
926 <label class="md-nav__link" for="__nav_8">
928 <span class="md-nav__icon md-icon"></span>
930 <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1">
931 <label class="md-nav__title" for="__nav_8">
932 <span class="md-nav__icon md-icon"></span>
935 <ul class="md-nav__list" data-md-scrollfix>
941 <li class="md-nav__item">
942 <a href="ft2-cache_subsystem.html" class="md-nav__link">
963 <li class="md-nav__item md-nav__item--nested">
966 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" >
968 <label class="md-nav__link" for="__nav_9">
970 <span class="md-nav__icon md-icon"></span>
972 <nav class="md-nav" aria-label="Support API" data-md-level="1">
973 <label class="md-nav__title" for="__nav_9">
974 <span class="md-nav__icon md-icon"></span>
977 <ul class="md-nav__list" data-md-scrollfix>
983 <li class="md-nav__item">
984 <a href="ft2-computations.html" class="md-nav__link">
995 <li class="md-nav__item">
996 <a href="ft2-list_processing.html" class="md-nav__link">
1007 <li class="md-nav__item">
1008 <a href="ft2-outline_processing.html" class="md-nav__link">
1019 <li class="md-nav__item">
1020 <a href="ft2-quick_advance.html" class="md-nav__link">
1021 Quick retrieval of advance values
1031 <li class="md-nav__item">
1032 <a href="ft2-bitmap_handling.html" class="md-nav__link">
1043 <li class="md-nav__item">
1044 <a href="ft2-raster.html" class="md-nav__link">
1055 <li class="md-nav__item">
1056 <a href="ft2-glyph_stroker.html" class="md-nav__link">
1067 <li class="md-nav__item">
1068 <a href="ft2-system_interface.html" class="md-nav__link">
1079 <li class="md-nav__item">
1080 <a href="ft2-module_management.html" class="md-nav__link">
1091 <li class="md-nav__item">
1092 <a href="ft2-gzip.html" class="md-nav__link">
1103 <li class="md-nav__item">
1104 <a href="ft2-lzw.html" class="md-nav__link">
1115 <li class="md-nav__item">
1116 <a href="ft2-bzip2.html" class="md-nav__link">
1127 <li class="md-nav__item">
1128 <a href="ft2-debugging_apis.html" class="md-nav__link">
1129 External Debugging APIs
1149 <li class="md-nav__item md-nav__item--nested">
1152 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" >
1154 <label class="md-nav__link" for="__nav_10">
1156 <span class="md-nav__icon md-icon"></span>
1158 <nav class="md-nav" aria-label="Error Codes" data-md-level="1">
1159 <label class="md-nav__title" for="__nav_10">
1160 <span class="md-nav__icon md-icon"></span>
1163 <ul class="md-nav__list" data-md-scrollfix>
1169 <li class="md-nav__item">
1170 <a href="ft2-error_enumerations.html" class="md-nav__link">
1181 <li class="md-nav__item">
1182 <a href="ft2-error_code_values.html" class="md-nav__link">
1203 <li class="md-nav__item md-nav__item--nested">
1206 <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_11" type="checkbox" id="__nav_11" >
1208 <label class="md-nav__link" for="__nav_11">
1210 <span class="md-nav__icon md-icon"></span>
1212 <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1">
1213 <label class="md-nav__title" for="__nav_11">
1214 <span class="md-nav__icon md-icon"></span>
1217 <ul class="md-nav__list" data-md-scrollfix>
1223 <li class="md-nav__item">
1224 <a href="ft2-gx_validation.html" class="md-nav__link">
1225 TrueTypeGX/AAT Validation
1235 <li class="md-nav__item">
1236 <a href="ft2-incremental.html" class="md-nav__link">
1247 <li class="md-nav__item">
1248 <a href="ft2-truetype_engine.html" class="md-nav__link">
1259 <li class="md-nav__item">
1260 <a href="ft2-ot_validation.html" class="md-nav__link">
1281 <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
1282 <div class="md-sidebar__scrollwrap">
1283 <div class="md-sidebar__inner">
1285 <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
1292 <label class="md-nav__title" for="__toc">
1293 <span class="md-nav__icon md-icon"></span>
1296 <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
1298 <li class="md-nav__item">
1299 <a href="#synopsis" class="md-nav__link">
1305 <li class="md-nav__item">
1306 <a href="#ft_get_name_index" class="md-nav__link">
1312 <li class="md-nav__item">
1313 <a href="#ft_get_glyph_name" class="md-nav__link">
1319 <li class="md-nav__item">
1320 <a href="#ft_get_postscript_name" class="md-nav__link">
1321 FT_Get_Postscript_Name
1326 <li class="md-nav__item">
1327 <a href="#ft_get_fstype_flags" class="md-nav__link">
1333 <li class="md-nav__item">
1334 <a href="#ft_fstype_xxx" class="md-nav__link">
1340 <li class="md-nav__item">
1341 <a href="#ft_get_subglyph_info" class="md-nav__link">
1342 FT_Get_SubGlyph_Info
1347 <li class="md-nav__item">
1348 <a href="#ft_subglyph_flag_xxx" class="md-nav__link">
1349 FT_SUBGLYPH_FLAG_XXX
1362 <div class="md-content" data-md-component="content">
1363 <article class="md-content__inner md-typeset">
1367 <p><a href="https://www.freetype.org">FreeType</a> » <a href="../">Docs</a> » <a href="index.html#core-api">Core API</a> » Information Retrieval</p>
1369 <h1 id="information-retrieval">Information Retrieval<a class="headerlink" href="#information-retrieval" title="Permanent link">¶</a></h1>
1370 <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">¶</a></h2>
1371 <p>Functions to retrieve font and glyph information. Only some very basic data is covered; see also the chapter on the format-specific API for more.</p>
1372 <h2 id="ft_get_name_index">FT_Get_Name_Index<a class="headerlink" href="#ft_get_name_index" title="Permanent link">¶</a></h2>
1373 <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
1374 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> )
1375 <b>FT_Get_Name_Index</b>( <a href="ft2-face_creation.html#ft_face">FT_Face</a> face,
1376 <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_string">FT_String</a>* glyph_name );
1379 <p>Return the glyph index of a given glyph name. This only works for those faces where <code><a href="ft2-font_testing_macros.html#ft_has_glyph_names">FT_HAS_GLYPH_NAMES</a></code> returns true.</p>
1381 <table class="fields">
1382 <tr><td class="val" id="face">face</td><td class="desc">
1383 <p>A handle to the source face object.</p>
1385 <tr><td class="val" id="glyph_name">glyph_name</td><td class="desc">
1386 <p>The glyph name.</p>
1392 <p>The glyph index. 0 means ‘undefined character code’.</p>
1395 <p>Acceptable glyph names might come from the <a href="https://github.com/adobe-type-tools/agl-aglfn">Adobe Glyph List</a>. See <code><a href="ft2-information_retrieval.html#ft_get_glyph_name">FT_Get_Glyph_Name</a></code> for the inverse functionality.</p>
1396 <p>This function has limited capabilities if the config macro <code>FT_CONFIG_OPTION_POSTSCRIPT_NAMES</code> is not defined in <code>ftoption.h</code>: It then works only for fonts that actually embed glyph names (which many recent OpenType fonts do not).</p>
1399 <h2 id="ft_get_glyph_name">FT_Get_Glyph_Name<a class="headerlink" href="#ft_get_glyph_name" title="Permanent link">¶</a></h2>
1400 <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
1401 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
1402 <b>FT_Get_Glyph_Name</b>( <a href="ft2-face_creation.html#ft_face">FT_Face</a> face,
1403 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> glyph_index,
1404 <a href="ft2-basic_types.html#ft_pointer">FT_Pointer</a> buffer,
1405 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> buffer_max );
1408 <p>Retrieve the ASCII name of a given glyph in a face. This only works for those faces where <code><a href="ft2-font_testing_macros.html#ft_has_glyph_names">FT_HAS_GLYPH_NAMES</a></code> returns true.</p>
1410 <table class="fields">
1411 <tr><td class="val" id="face">face</td><td class="desc">
1412 <p>A handle to a source face object.</p>
1414 <tr><td class="val" id="glyph_index">glyph_index</td><td class="desc">
1415 <p>The glyph index.</p>
1417 <tr><td class="val" id="buffer_max">buffer_max</td><td class="desc">
1418 <p>The maximum number of bytes available in the buffer.</p>
1423 <table class="fields">
1424 <tr><td class="val" id="buffer">buffer</td><td class="desc">
1425 <p>A pointer to a target buffer where the name is copied to.</p>
1431 <p>FreeType error code. 0 means success.</p>
1434 <p>An error is returned if the face doesn't provide glyph names or if the glyph index is invalid. In all cases of failure, the first byte of <code>buffer</code> is set to 0 to indicate an empty name.</p>
1435 <p>The glyph name is truncated to fit within the buffer if it is too long. The returned string is always zero-terminated.</p>
1436 <p>Be aware that FreeType reorders glyph indices internally so that glyph index 0 always corresponds to the ‘missing glyph’ (called ‘.notdef’).</p>
1437 <p>This function has limited capabilities if the config macro <code>FT_CONFIG_OPTION_POSTSCRIPT_NAMES</code> is not defined in <code>ftoption.h</code>: It then works only for fonts that actually embed glyph names (which many recent OpenType fonts do not).</p>
1440 <h2 id="ft_get_postscript_name">FT_Get_Postscript_Name<a class="headerlink" href="#ft_get_postscript_name" title="Permanent link">¶</a></h2>
1441 <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
1442 <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">const</span> <span class="keyword">char</span>* )
1443 <b>FT_Get_Postscript_Name</b>( <a href="ft2-face_creation.html#ft_face">FT_Face</a> face );
1446 <p>Retrieve the ASCII PostScript name of a given face, if available. This only works with PostScript, TrueType, and OpenType fonts.</p>
1448 <table class="fields">
1449 <tr><td class="val" id="face">face</td><td class="desc">
1450 <p>A handle to the source face object.</p>
1456 <p>A pointer to the face's PostScript name. <code>NULL</code> if unavailable.</p>
1459 <p>The returned pointer is owned by the face and is destroyed with it.</p>
1460 <p>For variation fonts, this string changes if you select a different instance, and you have to call <code>FT_Get_PostScript_Name</code> again to retrieve it. FreeType follows Adobe TechNote #5902, ‘Generating PostScript Names for Fonts Using OpenType Font Variations’.</p>
1461 <p><a href="https://download.macromedia.com/pub/developer/opentype/tech-notes/5902.AdobePSNameGeneration.html">https://download.macromedia.com/pub/developer/opentype/tech-notes/5902.AdobePSNameGeneration.html</a></p>
1462 <p>[Since 2.9] Special PostScript names for named instances are only returned if the named instance is set with <code><a href="ft2-multiple_masters.html#ft_set_named_instance">FT_Set_Named_Instance</a></code> (and the font has corresponding entries in its ‘fvar’ table or is the default named instance). If <code><a href="ft2-font_testing_macros.html#ft_is_variation">FT_IS_VARIATION</a></code> returns true, the algorithmically derived PostScript name is provided, not looking up special entries for named instances.</p>
1465 <h2 id="ft_get_fstype_flags">FT_Get_FSType_Flags<a class="headerlink" href="#ft_get_fstype_flags" title="Permanent link">¶</a></h2>
1466 <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
1467 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a> )
1468 <b>FT_Get_FSType_Flags</b>( <a href="ft2-face_creation.html#ft_face">FT_Face</a> face );
1471 <p>Return the <code>fsType</code> flags for a font.</p>
1473 <table class="fields">
1474 <tr><td class="val" id="face">face</td><td class="desc">
1475 <p>A handle to the source face object.</p>
1481 <p>The <code>fsType</code> flags, see <code><a href="ft2-information_retrieval.html#ft_fstype_xxx">FT_FSTYPE_XXX</a></code>.</p>
1484 <p>Use this function rather than directly reading the <code>fs_type</code> field in the <code><a href="ft2-type1_tables.html#ps_fontinforec">PS_FontInfoRec</a></code> structure, which is only guaranteed to return the correct results for Type 1 fonts.</p>
1490 <h2 id="ft_fstype_xxx">FT_FSTYPE_XXX<a class="headerlink" href="#ft_fstype_xxx" title="Permanent link">¶</a></h2>
1491 <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
1492 <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-information_retrieval.html#ft_fstype_installable_embedding">FT_FSTYPE_INSTALLABLE_EMBEDDING</a> 0x0000
1493 #<span class="keyword">define</span> <a href="ft2-information_retrieval.html#ft_fstype_restricted_license_embedding">FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING</a> 0x0002
1494 #<span class="keyword">define</span> <a href="ft2-information_retrieval.html#ft_fstype_preview_and_print_embedding">FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</a> 0x0004
1495 #<span class="keyword">define</span> <a href="ft2-information_retrieval.html#ft_fstype_editable_embedding">FT_FSTYPE_EDITABLE_EMBEDDING</a> 0x0008
1496 #<span class="keyword">define</span> <a href="ft2-information_retrieval.html#ft_fstype_no_subsetting">FT_FSTYPE_NO_SUBSETTING</a> 0x0100
1497 #<span class="keyword">define</span> <a href="ft2-information_retrieval.html#ft_fstype_bitmap_embedding_only">FT_FSTYPE_BITMAP_EMBEDDING_ONLY</a> 0x0200
1500 <p>A list of bit flags used in the <code>fsType</code> field of the OS/2 table in a TrueType or OpenType font and the <code>FSType</code> entry in a PostScript font. These bit flags are returned by <code><a href="ft2-information_retrieval.html#ft_get_fstype_flags">FT_Get_FSType_Flags</a></code>; they inform client applications of embedding and subsetting restrictions associated with a font.</p>
1501 <p>See <a href="https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf">https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf</a> for more details.</p>
1503 <table class="fields long">
1504 <tr><td class="val" id="ft_fstype_installable_embedding">FT_FSTYPE_INSTALLABLE_EMBEDDING</td><td class="desc">
1505 <p>Fonts with no fsType bit set may be embedded and permanently installed on the remote system by an application.</p>
1507 <tr><td class="val" id="ft_fstype_restricted_license_embedding">FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING</td><td class="desc">
1508 <p>Fonts that have only this bit set must not be modified, embedded or exchanged in any manner without first obtaining permission of the font software copyright owner.</p>
1510 <tr><td class="val" id="ft_fstype_preview_and_print_embedding">FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</td><td class="desc">
1511 <p>The font may be embedded and temporarily loaded on the remote system. Documents containing Preview & Print fonts must be opened ‘read-only’; no edits can be applied to the document.</p>
1513 <tr><td class="val" id="ft_fstype_editable_embedding">FT_FSTYPE_EDITABLE_EMBEDDING</td><td class="desc">
1514 <p>The font may be embedded but must only be installed temporarily on other systems. In contrast to Preview & Print fonts, documents containing editable fonts may be opened for reading, editing is permitted, and changes may be saved.</p>
1516 <tr><td class="val" id="ft_fstype_no_subsetting">FT_FSTYPE_NO_SUBSETTING</td><td class="desc">
1517 <p>The font may not be subsetted prior to embedding.</p>
1519 <tr><td class="val" id="ft_fstype_bitmap_embedding_only">FT_FSTYPE_BITMAP_EMBEDDING_ONLY</td><td class="desc">
1520 <p>Only bitmaps contained in the font may be embedded; no outline data may be embedded. If there are no bitmaps available in the font, then the font is unembeddable.</p>
1526 <p>The flags are ORed together, thus more than a single value can be returned.</p>
1527 <p>While the <code>fsType</code> flags can indicate that a font may be embedded, a license with the font vendor may be separately required to use the font in this way.</p>
1530 <h2 id="ft_get_subglyph_info">FT_Get_SubGlyph_Info<a class="headerlink" href="#ft_get_subglyph_info" title="Permanent link">¶</a></h2>
1531 <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
1532 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
1533 <b>FT_Get_SubGlyph_Info</b>( <a href="ft2-glyph_retrieval.html#ft_glyphslot">FT_GlyphSlot</a> glyph,
1534 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> sub_index,
1535 <a href="ft2-basic_types.html#ft_int">FT_Int</a> *p_index,
1536 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> *p_flags,
1537 <a href="ft2-basic_types.html#ft_int">FT_Int</a> *p_arg1,
1538 <a href="ft2-basic_types.html#ft_int">FT_Int</a> *p_arg2,
1539 <a href="ft2-basic_types.html#ft_matrix">FT_Matrix</a> *p_transform );
1542 <p>Retrieve a description of a given subglyph. Only use it if <code>glyph->format</code> is <code><a href="ft2-basic_types.html#ft_glyph_format">FT_GLYPH_FORMAT_COMPOSITE</a></code>; an error is returned otherwise.</p>
1544 <table class="fields">
1545 <tr><td class="val" id="glyph">glyph</td><td class="desc">
1546 <p>The source glyph slot.</p>
1548 <tr><td class="val" id="sub_index">sub_index</td><td class="desc">
1549 <p>The index of the subglyph. Must be less than <code>glyph->num_subglyphs</code>.</p>
1554 <table class="fields">
1555 <tr><td class="val" id="p_index">p_index</td><td class="desc">
1556 <p>The glyph index of the subglyph.</p>
1558 <tr><td class="val" id="p_flags">p_flags</td><td class="desc">
1559 <p>The subglyph flags, see <code><a href="ft2-information_retrieval.html#ft_subglyph_flag_xxx">FT_SUBGLYPH_FLAG_XXX</a></code>.</p>
1561 <tr><td class="val" id="p_arg1">p_arg1</td><td class="desc">
1562 <p>The subglyph's first argument (if any).</p>
1564 <tr><td class="val" id="p_arg2">p_arg2</td><td class="desc">
1565 <p>The subglyph's second argument (if any).</p>
1567 <tr><td class="val" id="p_transform">p_transform</td><td class="desc">
1568 <p>The subglyph transformation (if any).</p>
1574 <p>FreeType error code. 0 means success.</p>
1577 <p>The values of <code>*p_arg1</code>, <code>*p_arg2</code>, and <code>*p_transform</code> must be interpreted depending on the flags returned in <code>*p_flags</code>. See the OpenType specification for details.</p>
1578 <p><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/glyf#composite-glyph-description">https://docs.microsoft.com/en-us/typography/opentype/spec/glyf#composite-glyph-description</a></p>
1581 <h2 id="ft_subglyph_flag_xxx">FT_SUBGLYPH_FLAG_XXX<a class="headerlink" href="#ft_subglyph_flag_xxx" title="Permanent link">¶</a></h2>
1582 <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
1583 <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-information_retrieval.html#ft_subglyph_flag_args_are_words">FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS</a> 1
1584 #<span class="keyword">define</span> <a href="ft2-information_retrieval.html#ft_subglyph_flag_args_are_xy_values">FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES</a> 2
1585 #<span class="keyword">define</span> <a href="ft2-information_retrieval.html#ft_subglyph_flag_round_xy_to_grid">FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID</a> 4
1586 #<span class="keyword">define</span> <a href="ft2-information_retrieval.html#ft_subglyph_flag_scale">FT_SUBGLYPH_FLAG_SCALE</a> 8
1587 #<span class="keyword">define</span> <a href="ft2-information_retrieval.html#ft_subglyph_flag_xy_scale">FT_SUBGLYPH_FLAG_XY_SCALE</a> 0x40
1588 #<span class="keyword">define</span> <a href="ft2-information_retrieval.html#ft_subglyph_flag_2x2">FT_SUBGLYPH_FLAG_2X2</a> 0x80
1589 #<span class="keyword">define</span> <a href="ft2-information_retrieval.html#ft_subglyph_flag_use_my_metrics">FT_SUBGLYPH_FLAG_USE_MY_METRICS</a> 0x200
1592 <p>A list of constants describing subglyphs. Please refer to the ‘glyf’ table description in the OpenType specification for the meaning of the various flags (which get synthesized for non-OpenType subglyphs).</p>
1593 <p><a href="https://docs.microsoft.com/en-us/typography/opentype/spec/glyf#composite-glyph-description">https://docs.microsoft.com/en-us/typography/opentype/spec/glyf#composite-glyph-description</a></p>
1595 <table class="fields long">
1596 <tr><td class="val" id="ft_subglyph_flag_args_are_words">FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS</td><td class="desc">
1599 <tr><td class="val" id="ft_subglyph_flag_args_are_xy_values">FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES</td><td class="desc">
1602 <tr><td class="val" id="ft_subglyph_flag_round_xy_to_grid">FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID</td><td class="desc">
1605 <tr><td class="val" id="ft_subglyph_flag_scale">FT_SUBGLYPH_FLAG_SCALE</td><td class="desc">
1608 <tr><td class="val" id="ft_subglyph_flag_xy_scale">FT_SUBGLYPH_FLAG_XY_SCALE</td><td class="desc">
1611 <tr><td class="val" id="ft_subglyph_flag_2x2">FT_SUBGLYPH_FLAG_2X2</td><td class="desc">
1614 <tr><td class="val" id="ft_subglyph_flag_use_my_metrics">FT_SUBGLYPH_FLAG_USE_MY_METRICS</td><td class="desc">
1634 <footer class="md-footer">
1636 <nav class="md-footer__inner md-grid" aria-label="Footer">
1639 <a href="ft2-character_mapping.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Character Mapping" rel="prev">
1640 <div class="md-footer__button md-icon">
1641 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
1643 <div class="md-footer__title">
1644 <div class="md-ellipsis">
1645 <span class="md-footer__direction">
1655 <a href="ft2-other_api_data.html" class="md-footer__link md-footer__link--next" aria-label="Next: Other API Data" rel="next">
1656 <div class="md-footer__title">
1657 <div class="md-ellipsis">
1658 <span class="md-footer__direction">
1664 <div class="md-footer__button md-icon">
1665 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
1671 <div class="md-footer-meta md-typeset">
1672 <div class="md-footer-meta__inner md-grid">
1673 <div class="md-footer-copyright">
1675 <div class="md-footer-copyright__highlight">
1676 Copyright 2023 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>.
1680 <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
1691 <div class="md-dialog" data-md-component="dialog">
1692 <div class="md-dialog__inner md-typeset"></div>
1694 <script id="__config" type="application/json">{"base": ".", "features": [], "search": "assets/javascripts/workers/search.477d984a.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "version": null}</script>
1697 <script src="assets/javascripts/bundle.82b56eb2.min.js"></script>
1699 <script src="javascripts/extra.js"></script>