1 
2 //          Copyright Ahmet Sait Koçak 2020.
3 // Distributed under the Boost Software License, Version 1.0.
4 //    (See accompanying file LICENSE_1_0.txt or copy at
5 //          https://www.boost.org/LICENSE_1_0.txt)
6 
7 module bindbc.hb.bind.ot.meta;
8 
9 import bindbc.hb.config;
10 
11 static if (hbSupport >= HBSupport.v2_6_3)
12 {
13 	import bindbc.hb.bind.blob;
14 	import bindbc.hb.bind.common;
15 	import bindbc.hb.bind.face;
16 
17 	extern(C) @nogc nothrow:
18 
19 	/**
20 	 * hb_ot_meta_tag_t:
21 	 * @HB_OT_META_TAG_DESIGN_LANGUAGES: Design languages. Text, using only
22 	 * Basic Latin (ASCII) characters. Indicates languages and/or scripts
23 	 * for the user audiences that the font was primarily designed for.
24 	 * @HB_OT_META_TAG_SUPPORTED_LANGUAGES: Supported languages. Text, using
25 	 * only Basic Latin (ASCII) characters. Indicates languages and/or scripts
26 	 * that the font is declared to be capable of supporting.
27 	 *
28 	 * Known metadata tags from https://docs.microsoft.com/en-us/typography/opentype/spec/meta
29 	 *
30 	 * Since: 2.6.0
31 	 **/
32 	enum : hb_tag_t
33 	{
34 		/*
35 		   HB_OT_META_TAG_APPL		= HB_TAG ('a','p','p','l'),
36 		   HB_OT_META_TAG_BILD		= HB_TAG ('b','i','l','d'),
37 		*/
38 		HB_OT_META_TAG_DESIGN_LANGUAGES = HB_TAG('d', 'l', 'n', 'g'),
39 		HB_OT_META_TAG_SUPPORTED_LANGUAGES = HB_TAG('s', 'l', 'n', 'g'),
40 
41 		_HB_OT_META_TAG_MAX_VALUE = HB_TAG_MAX_SIGNED /*< skip >*/
42 	}
43 	alias hb_ot_meta_tag_t = hb_tag_t;
44 
45 	/* IN/OUT.  May be NULL. */
46 	/* OUT.     May be NULL. */
47 	version(BindHB_Static)
48 		uint hb_ot_meta_get_entry_tags (
49 			hb_face_t* face,
50 			uint start_offset,
51 			uint* entries_count,
52 			hb_ot_meta_tag_t* entries);
53 	else
54 	{
55 		private alias fp_hb_ot_meta_get_entry_tags = uint function (
56 			hb_face_t* face,
57 			uint start_offset,
58 			uint* entries_count,
59 			hb_ot_meta_tag_t* entries);
60 		__gshared fp_hb_ot_meta_get_entry_tags hb_ot_meta_get_entry_tags;
61 	}
62 
63 	version(BindHB_Static)
64 		hb_blob_t* hb_ot_meta_reference_entry (
65 			hb_face_t* face,
66 			hb_ot_meta_tag_t meta_tag);
67 	else
68 	{
69 		private alias fp_hb_ot_meta_reference_entry = hb_blob_t* function (
70 			hb_face_t* face,
71 			hb_ot_meta_tag_t meta_tag);
72 		__gshared fp_hb_ot_meta_reference_entry hb_ot_meta_reference_entry;
73 	}
74 }