Merge pull request #56952 from akien-mga/3.x-cherrypicks
This commit is contained in:
commit
322ba882bb
@ -176,7 +176,7 @@ License: Expat and Bitstream Vera Fonts Copyright
|
||||
|
||||
Files: ./thirdparty/freetype/
|
||||
Comment: The FreeType Project
|
||||
Copyright: 1996-2020, David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
Copyright: 1996-2021, David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
License: FTL
|
||||
|
||||
Files: ./thirdparty/glad/
|
||||
|
@ -30,6 +30,7 @@ if not has_module:
|
||||
thirdparty_mbedtls_sources = [
|
||||
"aes.c",
|
||||
"base64.c",
|
||||
"constant_time.c",
|
||||
"md5.c",
|
||||
"sha1.c",
|
||||
"sha256.c",
|
||||
|
@ -182,7 +182,7 @@
|
||||
If [code]true[/code], the [CollisionObject] will continue to receive input events as the mouse is dragged across its shapes.
|
||||
</member>
|
||||
<member name="input_ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" default="true">
|
||||
If [code]true[/code], the [CollisionObject]'s shapes will respond to [RayCast]s.
|
||||
If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [member collision_layer] bit to be set.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
|
@ -207,7 +207,7 @@
|
||||
[b]Note:[/b] A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
|
||||
</member>
|
||||
<member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" default="true">
|
||||
If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [code]collision_layer[/code] bit to be set.
|
||||
If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [member collision_layer] bit to be set.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
|
@ -115,6 +115,9 @@
|
||||
OS.execute("CMD.exe", ["/C", "cd %TEMP% && dir"], true, output)
|
||||
[/codeblock]
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
|
||||
[b]Note:[/b] To execute a Windows command interpreter built-in command, specify [code]cmd.exe[/code] in [code]path[/code], [code]/c[/code] as the first argument, and the desired command as the second argument.
|
||||
[b]Note:[/b] To execute a PowerShell built-in command, specify [code]powershell.exe[/code] in [code]path[/code], [code]-Command[/code] as the first argument, and the desired command as the second argument.
|
||||
[b]Note:[/b] To execute a Unix shell built-in command, specify shell executable name in [code]path[/code], [code]-c[/code] as the first argument, and the desired command as the second argument.
|
||||
</description>
|
||||
</method>
|
||||
<method name="find_scancode_from_string" qualifiers="const">
|
||||
|
@ -243,7 +243,7 @@
|
||||
</member>
|
||||
<member name="bbcode_text" type="String" setter="set_bbcode" getter="get_bbcode" default="""">
|
||||
The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited.
|
||||
[b]Note:[/b] It is unadvised to use the [code]+=[/code] operator with [code]bbcode_text[/code] (e.g. [code]bbcode_text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. Use [method append_bbcode] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call.
|
||||
[b]Note:[/b] It is unadvised to use the [code]+=[/code] operator with [code]bbcode_text[/code] (e.g. [code]bbcode_text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. It will also erase all BBCode that was added to stack using [code]push_*[/code] methods. Use [method append_bbcode] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call.
|
||||
</member>
|
||||
<member name="custom_effects" type="Array" setter="set_effects" getter="get_effects" default="[ ]">
|
||||
The currently installed custom effects. This is an array of [RichTextEffect]s.
|
||||
|
@ -775,13 +775,24 @@
|
||||
<method name="to_float">
|
||||
<return type="float" />
|
||||
<description>
|
||||
Converts a string containing a decimal number into a [code]float[/code].
|
||||
Converts a string containing a decimal number into a [code]float[/code]. The method will stop on the first non-number character except the first [code].[/code] (decimal point), and [code]e[/code] which is used for exponential.
|
||||
[codeblock]
|
||||
print("12.3".to_float()) # 12.3
|
||||
print("1.2.3".to_float()) # 1.2
|
||||
print("12ab3".to_float()) # 12
|
||||
print("1e3".to_float()) # 1000
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
<method name="to_int">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Converts a string containing an integer number into an [code]int[/code].
|
||||
Converts a string containing an integer number into an [code]int[/code]. The method will remove any non-number character and stop if it encounters a [code].[/code].
|
||||
[codeblock]
|
||||
print("123".to_int()) # 123
|
||||
print("a1b2c3".to_int()) # 123
|
||||
print("1.2.3".to_int()) # 1
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
<method name="to_lower">
|
||||
|
@ -104,6 +104,18 @@ void EditorFileDialog::_notification(int p_what) {
|
||||
fav_down->set_icon(get_icon("MoveDown", "EditorIcons"));
|
||||
// DO NOT CALL UPDATE FILE LIST HERE, ALL HUNDREDS OF HIDDEN DIALOGS WILL RESPOND, CALL INVALIDATE INSTEAD
|
||||
invalidate();
|
||||
} else if (p_what == NOTIFICATION_WM_FOCUS_IN) {
|
||||
// Check if the current directory was removed externally (much less likely to happen while editor window is focused).
|
||||
String previous_dir = get_current_dir();
|
||||
while (!dir_access->dir_exists(get_current_dir())) {
|
||||
_go_up();
|
||||
|
||||
// In case we can't go further up, use some fallback and break.
|
||||
if (get_current_dir() == previous_dir) {
|
||||
_dir_entered(OS::get_singleton()->get_user_data_dir());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1269,7 +1281,7 @@ void EditorFileDialog::_recent_selected(int p_idx) {
|
||||
}
|
||||
|
||||
void EditorFileDialog::_go_up() {
|
||||
dir_access->change_dir("..");
|
||||
dir_access->change_dir(get_current_dir().get_base_dir());
|
||||
update_file_list();
|
||||
update_dir();
|
||||
_push_history();
|
||||
|
@ -1498,6 +1498,10 @@ void EditorFileSystem::update_file(const String &p_file) {
|
||||
_queue_update_script_classes();
|
||||
}
|
||||
|
||||
Set<String> EditorFileSystem::get_valid_extensions() const {
|
||||
return valid_extensions;
|
||||
}
|
||||
|
||||
Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector<String> &p_files) {
|
||||
String importer_name;
|
||||
|
||||
|
@ -262,6 +262,7 @@ public:
|
||||
void scan_changes();
|
||||
void get_changed_sources(List<String> *r_changed);
|
||||
void update_file(const String &p_file);
|
||||
Set<String> get_valid_extensions() const;
|
||||
|
||||
EditorFileSystemDirectory *get_filesystem_path(const String &p_path);
|
||||
String get_file_type(const String &p_file) const;
|
||||
|
@ -1436,12 +1436,18 @@ void FileSystemDock::_folder_removed(String p_folder) {
|
||||
|
||||
void FileSystemDock::_rename_operation_confirm() {
|
||||
String new_name = rename_dialog_text->get_text().strip_edges();
|
||||
String old_name = tree->get_selected()->get_text(0);
|
||||
if (new_name.length() == 0) {
|
||||
EditorNode::get_singleton()->show_warning(TTR("No name provided."));
|
||||
return;
|
||||
} else if (new_name.find("/") != -1 || new_name.find("\\") != -1 || new_name.find(":") != -1) {
|
||||
EditorNode::get_singleton()->show_warning(TTR("Name contains invalid characters."));
|
||||
return;
|
||||
} else if (to_rename.is_file && old_name.get_extension() != new_name.get_extension()) {
|
||||
if (!EditorFileSystem::get_singleton()->get_valid_extensions().find(new_name.get_extension())) {
|
||||
EditorNode::get_singleton()->show_warning(TTR("This file extension is not recognized by the editor.\nIf you want to rename it anyway, use your operating system's file manager.\nAfter renaming to an unknown extension, the file won't be shown in the editor anymore."));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
String old_path = to_rename.path.ends_with("/") ? to_rename.path.substr(0, to_rename.path.length() - 1) : to_rename.path;
|
||||
@ -2450,6 +2456,7 @@ void FileSystemDock::_file_and_folders_fill_popup(PopupMenu *p_popup, Vector<Str
|
||||
String fpath = p_paths[0];
|
||||
String item_text = fpath.ends_with("/") ? TTR("Open in File Manager") : TTR("Show in File Manager");
|
||||
p_popup->add_icon_item(get_icon("Filesystem", "EditorIcons"), item_text, FILE_SHOW_IN_EXPLORER);
|
||||
path = fpath;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2484,6 +2491,9 @@ void FileSystemDock::_tree_rmb_empty(const Vector2 &p_pos) {
|
||||
tree_popup->add_icon_item(get_icon("PackedScene", "EditorIcons"), TTR("New Scene..."), FILE_NEW_SCENE);
|
||||
tree_popup->add_icon_item(get_icon("Script", "EditorIcons"), TTR("New Script..."), FILE_NEW_SCRIPT);
|
||||
tree_popup->add_icon_item(get_icon("Object", "EditorIcons"), TTR("New Resource..."), FILE_NEW_RESOURCE);
|
||||
tree_popup->add_separator();
|
||||
tree_popup->add_icon_item(get_icon("Filesystem", "EditorIcons"), TTR("Open in File Manager"), FILE_SHOW_IN_EXPLORER);
|
||||
|
||||
tree_popup->set_position(tree->get_global_position() + p_pos);
|
||||
tree_popup->popup();
|
||||
}
|
||||
@ -2522,6 +2532,8 @@ void FileSystemDock::_file_list_rmb_pressed(const Vector2 &p_pos) {
|
||||
return;
|
||||
}
|
||||
|
||||
path = current_path->get_text();
|
||||
|
||||
file_list_popup->clear();
|
||||
file_list_popup->set_size(Size2(1, 1));
|
||||
|
||||
|
@ -1 +1 @@
|
||||
<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 0v3h-3v2h3v4h-3v2h3v3h2v-9h9v-2h-3v-3h-2v3h-4v-3zm4 13v2h2v-2zm6 0v2h2v-2z" fill="#e0e0e0"/><path d="m11 7a4 4 0 0 0 -4 4v2h2v-2a2 2 0 0 1 2-2 2 2 0 0 1 2 2v2h2v-2a4 4 0 0 0 -4-4z" fill="#fff" fill-opacity=".68627"/></svg>
|
||||
<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 0v2h-2v1h2v4h-2v1h2v4h-2v1h2v2h1v-2h3v-1h-3v-4h4l1-1v-4h4v3h1v-3h2v-1h-2v-2h-1v2h-4v-2h-1v2h-4v-2zm1 3h4v4h-4zm4 10v2h2v-2zm6 0v2h2v-2z" fill="#e0e0e0"/><path d="m11 7a4 4 0 0 0 -4 4v2h2v-2a2 2 0 0 1 2-2 2 2 0 0 1 2 2v2h2v-2a4 4 0 0 0 -4-4z" fill="#fff" fill-opacity=".68627"/></svg>
|
||||
|
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 379 B |
@ -103,7 +103,7 @@ void AnimationNodeBlendTreeEditor::_property_changed(const StringName &p_propert
|
||||
}
|
||||
|
||||
void AnimationNodeBlendTreeEditor::_update_graph() {
|
||||
if (updating) {
|
||||
if (updating || blend_tree.is_null()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -136,9 +136,11 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
|
||||
continue;
|
||||
}
|
||||
|
||||
//Transform shape_transform = sb->shape_owner_get_transform(E->get());
|
||||
|
||||
//shape_transform.set_origin(shape_transform.get_origin() - phys_offset);
|
||||
Transform shape_transform;
|
||||
if (p_apply_xforms) {
|
||||
shape_transform = mi->get_transform();
|
||||
}
|
||||
shape_transform *= sb->get_transform() * sb->shape_owner_get_transform(E->get());
|
||||
|
||||
for (int k = 0; k < sb->shape_owner_get_shape_count(E->get()); k++) {
|
||||
Ref<Shape> collision = sb->shape_owner_get_shape(E->get(), k);
|
||||
@ -147,7 +149,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
|
||||
}
|
||||
MeshLibrary::ShapeData shape_data;
|
||||
shape_data.shape = collision;
|
||||
shape_data.local_transform = sb->get_transform() * sb->shape_owner_get_transform(E->get());
|
||||
shape_data.local_transform = shape_transform;
|
||||
collisions.push_back(shape_data);
|
||||
}
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ if env["builtin_freetype"]:
|
||||
"src/pshinter/pshinter.c",
|
||||
"src/psnames/psnames.c",
|
||||
"src/raster/raster.c",
|
||||
"src/sdf/sdf.c",
|
||||
"src/smooth/smooth.c",
|
||||
"src/truetype/truetype.c",
|
||||
"src/type1/type1.c",
|
||||
|
@ -29,6 +29,7 @@ if env["builtin_mbedtls"]:
|
||||
"cipher_wrap.c",
|
||||
"cmac.c",
|
||||
"ctr_drbg.c",
|
||||
"constant_time.c",
|
||||
"debug.c",
|
||||
"des.c",
|
||||
"dhm.c",
|
||||
@ -48,8 +49,9 @@ if env["builtin_mbedtls"]:
|
||||
"md4.c",
|
||||
"md5.c",
|
||||
"md.c",
|
||||
"md_wrap.c",
|
||||
"memory_buffer_alloc.c",
|
||||
"mps_reader.c",
|
||||
"mps_trace.c",
|
||||
"net_sockets.c",
|
||||
"nist_kw.c",
|
||||
"oid.c",
|
||||
@ -75,9 +77,11 @@ if env["builtin_mbedtls"]:
|
||||
"ssl_ciphersuites.c",
|
||||
"ssl_cli.c",
|
||||
"ssl_cookie.c",
|
||||
"ssl_msg.c",
|
||||
"ssl_srv.c",
|
||||
"ssl_ticket.c",
|
||||
"ssl_tls.c",
|
||||
"ssl_tls13_keys.c",
|
||||
"threading.c",
|
||||
"timing.c",
|
||||
"version.c",
|
||||
|
@ -318,6 +318,9 @@ namespace Godot.Collections
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void godot_icall_Dictionary_KeyValuePairAt(IntPtr ptr, int index, out object key, out object value);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void godot_icall_Dictionary_KeyValuePairAt_Generic(IntPtr ptr, int index, out object key, out object value, int valueTypeEncoding, IntPtr valueTypeClass);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void godot_icall_Dictionary_Add(IntPtr ptr, object key, object value);
|
||||
|
||||
@ -484,7 +487,7 @@ namespace Godot.Collections
|
||||
|
||||
private KeyValuePair<TKey, TValue> GetKeyValuePair(int index)
|
||||
{
|
||||
Dictionary.godot_icall_Dictionary_KeyValuePairAt(GetPtr(), index, out object key, out object value);
|
||||
Dictionary.godot_icall_Dictionary_KeyValuePairAt_Generic(GetPtr(), index, out object key, out object value, valTypeEncoding, valTypeClass);
|
||||
return new KeyValuePair<TKey, TValue>((TKey)key, (TValue)value);
|
||||
}
|
||||
|
||||
|
@ -240,6 +240,12 @@ void godot_icall_Dictionary_KeyValuePairAt(Dictionary *ptr, int index, MonoObjec
|
||||
*value = GDMonoMarshal::variant_to_mono_object(ptr->get_value_at_index(index));
|
||||
}
|
||||
|
||||
void godot_icall_Dictionary_KeyValuePairAt_Generic(Dictionary *ptr, int index, MonoObject **key, MonoObject **value, uint32_t value_type_encoding, GDMonoClass *value_type_class) {
|
||||
ManagedType type(value_type_encoding, value_type_class);
|
||||
*key = GDMonoMarshal::variant_to_mono_object(ptr->get_key_at_index(index));
|
||||
*value = GDMonoMarshal::variant_to_mono_object(ptr->get_value_at_index(index), type);
|
||||
}
|
||||
|
||||
void godot_icall_Dictionary_Add(Dictionary *ptr, MonoObject *key, MonoObject *value) {
|
||||
Variant varKey = GDMonoMarshal::mono_object_to_variant(key);
|
||||
Variant *ret = ptr->getptr(varKey);
|
||||
@ -350,6 +356,7 @@ void godot_register_collections_icalls() {
|
||||
GDMonoUtils::add_internal_call("Godot.Collections.Dictionary::godot_icall_Dictionary_Count", godot_icall_Dictionary_Count);
|
||||
GDMonoUtils::add_internal_call("Godot.Collections.Dictionary::godot_icall_Dictionary_KeyValuePairs", godot_icall_Dictionary_KeyValuePairs);
|
||||
GDMonoUtils::add_internal_call("Godot.Collections.Dictionary::godot_icall_Dictionary_KeyValuePairAt", godot_icall_Dictionary_KeyValuePairAt);
|
||||
GDMonoUtils::add_internal_call("Godot.Collections.Dictionary::godot_icall_Dictionary_KeyValuePairAt_Generic", godot_icall_Dictionary_KeyValuePairAt_Generic);
|
||||
GDMonoUtils::add_internal_call("Godot.Collections.Dictionary::godot_icall_Dictionary_Add", godot_icall_Dictionary_Add);
|
||||
GDMonoUtils::add_internal_call("Godot.Collections.Dictionary::godot_icall_Dictionary_Clear", godot_icall_Dictionary_Clear);
|
||||
GDMonoUtils::add_internal_call("Godot.Collections.Dictionary::godot_icall_Dictionary_Contains", godot_icall_Dictionary_Contains);
|
||||
|
@ -409,17 +409,17 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options)
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/microphone_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need to use the microphone"), ""));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/photolibrary_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need access to the photo library"), ""));
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "icons/generate_missing"), false));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/iphone_120x120", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPhone/iPod Touch with Retina display
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/iphone_180x180", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPhone with Retina HD display
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "required_icons/iphone_120x120", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPhone/iPod Touch with retina display
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "required_icons/ipad_76x76", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPad
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "required_icons/app_store_1024x1024", PROPERTY_HINT_FILE, "*.png"), "")); // App Store
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/ipad_76x76", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPad
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/ipad_152x152", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPad with Retina display
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/ipad_167x167", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPad Pro
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "optional_icons/iphone_180x180", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPhone with retina HD display
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "optional_icons/ipad_152x152", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPad with retina display
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "optional_icons/ipad_167x167", PROPERTY_HINT_FILE, "*.png"), "")); // Home screen on iPad Pro
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "optional_icons/spotlight_40x40", PROPERTY_HINT_FILE, "*.png"), "")); // Spotlight
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "optional_icons/spotlight_80x80", PROPERTY_HINT_FILE, "*.png"), "")); // Spotlight on devices with retina display
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/app_store_1024x1024", PROPERTY_HINT_FILE, "*.png"), "")); // App Store
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/spotlight_40x40", PROPERTY_HINT_FILE, "*.png"), "")); // Spotlight
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/spotlight_80x80", PROPERTY_HINT_FILE, "*.png"), "")); // Spotlight on devices with Retina display
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "storyboard/use_launch_screen_storyboard"), false));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "storyboard/image_scale_mode", PROPERTY_HINT_ENUM, "Same as Logo,Center,Scale to Fit,Scale to Fill,Scale"), 0));
|
||||
@ -428,8 +428,6 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options)
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "storyboard/use_custom_bg_color"), false));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::COLOR, "storyboard/custom_bg_color"), Color()));
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "launch_screens/generate_missing"), false));
|
||||
|
||||
for (uint64_t i = 0; i < sizeof(loading_screen_infos) / sizeof(loading_screen_infos[0]); ++i) {
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, loading_screen_infos[i].preset_key, PROPERTY_HINT_FILE, "*.png"), ""));
|
||||
}
|
||||
@ -737,27 +735,26 @@ struct IconInfo {
|
||||
const char *actual_size_side;
|
||||
const char *scale;
|
||||
const char *unscaled_size;
|
||||
bool is_required;
|
||||
};
|
||||
|
||||
static const IconInfo icon_infos[] = {
|
||||
{ "required_icons/iphone_120x120", "iphone", "Icon-120.png", "120", "2x", "60x60", true },
|
||||
{ "required_icons/iphone_120x120", "iphone", "Icon-120.png", "120", "3x", "40x40", true },
|
||||
// Home screen on iPhone
|
||||
{ "icons/iphone_120x120", "iphone", "Icon-120.png", "120", "2x", "60x60" },
|
||||
{ "icons/iphone_120x120", "iphone", "Icon-120.png", "120", "3x", "40x40" },
|
||||
{ "icons/iphone_180x180", "iphone", "Icon-180.png", "180", "3x", "60x60" },
|
||||
|
||||
{ "required_icons/ipad_76x76", "ipad", "Icon-76.png", "76", "1x", "76x76", true },
|
||||
{ "required_icons/app_store_1024x1024", "ios-marketing", "Icon-1024.png", "1024", "1x", "1024x1024", true },
|
||||
// Home screen on iPad
|
||||
{ "icons/ipad_76x76", "ipad", "Icon-76.png", "76", "1x", "76x76" },
|
||||
{ "icons/ipad_152x152", "ipad", "Icon-152.png", "152", "2x", "76x76" },
|
||||
{ "icons/ipad_167x167", "ipad", "Icon-167.png", "167", "2x", "83.5x83.5" },
|
||||
|
||||
{ "optional_icons/iphone_180x180", "iphone", "Icon-180.png", "180", "3x", "60x60", false },
|
||||
|
||||
{ "optional_icons/ipad_152x152", "ipad", "Icon-152.png", "152", "2x", "76x76", false },
|
||||
|
||||
{ "optional_icons/ipad_167x167", "ipad", "Icon-167.png", "167", "2x", "83.5x83.5", false },
|
||||
|
||||
{ "optional_icons/spotlight_40x40", "ipad", "Icon-40.png", "40", "1x", "40x40", false },
|
||||
|
||||
{ "optional_icons/spotlight_80x80", "iphone", "Icon-80.png", "80", "2x", "40x40", false },
|
||||
{ "optional_icons/spotlight_80x80", "ipad", "Icon-80.png", "80", "2x", "40x40", false }
|
||||
// App Store
|
||||
{ "icons/app_store_1024x1024", "ios-marketing", "Icon-1024.png", "1024", "1x", "1024x1024" },
|
||||
|
||||
// Spotlight
|
||||
{ "icons/spotlight_40x40", "ipad", "Icon-40.png", "40", "1x", "40x40" },
|
||||
{ "icons/spotlight_80x80", "iphone", "Icon-80.png", "80", "2x", "40x40" },
|
||||
{ "icons/spotlight_80x80", "ipad", "Icon-80.png", "80", "2x", "40x40" }
|
||||
};
|
||||
|
||||
Error EditorExportPlatformIOS::_export_icons(const Ref<EditorExportPreset> &p_preset, const String &p_iconset_dir) {
|
||||
@ -772,35 +769,23 @@ Error EditorExportPlatformIOS::_export_icons(const Ref<EditorExportPreset> &p_pr
|
||||
int side_size = String(info.actual_size_side).to_int();
|
||||
String icon_path = p_preset->get(info.preset_key);
|
||||
if (icon_path.length() == 0) {
|
||||
if ((bool)p_preset->get("icons/generate_missing")) {
|
||||
// Resize main app icon
|
||||
icon_path = ProjectSettings::get_singleton()->get("application/config/icon");
|
||||
Ref<Image> img = memnew(Image);
|
||||
Error err = ImageLoader::load_image(icon_path, img);
|
||||
if (err != OK) {
|
||||
ERR_PRINT("Invalid icon (" + String(info.preset_key) + "): '" + icon_path + "'.");
|
||||
return ERR_UNCONFIGURED;
|
||||
}
|
||||
img->resize(side_size, side_size);
|
||||
err = img->save_png(p_iconset_dir + info.export_name);
|
||||
if (err) {
|
||||
String err_str = String("Failed to export icon(" + String(info.preset_key) + "): '" + icon_path + "'.");
|
||||
ERR_PRINT(err_str.utf8().get_data());
|
||||
return err;
|
||||
}
|
||||
} else {
|
||||
if (info.is_required) {
|
||||
String err_str = String("Required icon (") + info.preset_key + ") is not specified in the preset.";
|
||||
ERR_PRINT(err_str);
|
||||
return ERR_UNCONFIGURED;
|
||||
} else {
|
||||
String err_str = String("Icon (") + info.preset_key + ") is not specified in the preset.";
|
||||
WARN_PRINT(err_str);
|
||||
}
|
||||
continue;
|
||||
// Resize main app icon
|
||||
icon_path = ProjectSettings::get_singleton()->get("application/config/icon");
|
||||
Ref<Image> img = memnew(Image);
|
||||
Error err = ImageLoader::load_image(icon_path, img);
|
||||
if (err != OK) {
|
||||
ERR_PRINT("Invalid icon (" + String(info.preset_key) + "): '" + icon_path + "'.");
|
||||
return ERR_UNCONFIGURED;
|
||||
}
|
||||
img->resize(side_size, side_size);
|
||||
err = img->save_png(p_iconset_dir + info.export_name);
|
||||
if (err) {
|
||||
String err_str = String("Failed to export icon(" + String(info.preset_key) + "): '" + icon_path + "'.");
|
||||
ERR_PRINT(err_str.utf8().get_data());
|
||||
return err;
|
||||
}
|
||||
} else {
|
||||
// Load custom icon
|
||||
// Load custom icon and resize if required
|
||||
Ref<Image> img = memnew(Image);
|
||||
Error err = ImageLoader::load_image(icon_path, img);
|
||||
if (err != OK) {
|
||||
@ -808,11 +793,13 @@ Error EditorExportPlatformIOS::_export_icons(const Ref<EditorExportPreset> &p_pr
|
||||
return ERR_UNCONFIGURED;
|
||||
}
|
||||
if (img->get_width() != side_size || img->get_height() != side_size) {
|
||||
ERR_PRINT("Invalid icon size (" + String(info.preset_key) + "): '" + icon_path + "'.");
|
||||
return ERR_UNCONFIGURED;
|
||||
WARN_PRINT("Icon (" + String(info.preset_key) + "): '" + icon_path + "' has incorrect size (" + String::num_int64(img->get_width()) + "x" + String::num_int64(img->get_height()) + ") and was automatically resized to " + String::num_int64(side_size) + "x" + String::num_int64(side_size) + ".");
|
||||
img->resize(side_size, side_size);
|
||||
err = img->save_png(p_iconset_dir + info.export_name);
|
||||
} else {
|
||||
err = da->copy(icon_path, p_iconset_dir + info.export_name);
|
||||
}
|
||||
|
||||
err = da->copy(icon_path, p_iconset_dir + info.export_name);
|
||||
if (err) {
|
||||
memdelete(da);
|
||||
String err_str = String("Failed to export icon(" + String(info.preset_key) + "): '" + icon_path + "'.");
|
||||
@ -924,8 +911,13 @@ Error EditorExportPlatformIOS::_export_loading_screen_images(const Ref<EditorExp
|
||||
for (uint64_t i = 0; i < sizeof(loading_screen_infos) / sizeof(loading_screen_infos[0]); ++i) {
|
||||
LoadingScreenInfo info = loading_screen_infos[i];
|
||||
String loading_screen_file = p_preset->get(info.preset_key);
|
||||
|
||||
Color boot_bg_color = ProjectSettings::get_singleton()->get("application/boot_splash/bg_color");
|
||||
String boot_logo_path = ProjectSettings::get_singleton()->get("application/boot_splash/image");
|
||||
bool boot_logo_scale = ProjectSettings::get_singleton()->get("application/boot_splash/fullsize");
|
||||
|
||||
if (loading_screen_file.size() > 0) {
|
||||
// Load custom loading screens
|
||||
// Load custom loading screens, and resize if required.
|
||||
Ref<Image> img = memnew(Image);
|
||||
Error err = ImageLoader::load_image(loading_screen_file, img);
|
||||
if (err != OK) {
|
||||
@ -933,22 +925,31 @@ Error EditorExportPlatformIOS::_export_loading_screen_images(const Ref<EditorExp
|
||||
return ERR_UNCONFIGURED;
|
||||
}
|
||||
if (img->get_width() != info.width || img->get_height() != info.height) {
|
||||
ERR_PRINT("Invalid loading screen size (" + String(info.preset_key) + "): '" + loading_screen_file + "'.");
|
||||
return ERR_UNCONFIGURED;
|
||||
WARN_PRINT("Loading screen (" + String(info.preset_key) + "): '" + loading_screen_file + "' has incorrect size (" + String::num_int64(img->get_width()) + "x" + String::num_int64(img->get_height()) + ") and was automatically resized to " + String::num_int64(info.width) + "x" + String::num_int64(info.height) + ".");
|
||||
float aspect_ratio = (float)img->get_width() / (float)img->get_height();
|
||||
if (boot_logo_scale) {
|
||||
if (info.height * aspect_ratio <= info.width) {
|
||||
img->resize(info.height * aspect_ratio, info.height);
|
||||
} else {
|
||||
img->resize(info.width, info.width / aspect_ratio);
|
||||
}
|
||||
}
|
||||
Ref<Image> new_img = memnew(Image);
|
||||
new_img->create(info.width, info.height, false, Image::FORMAT_RGBA8);
|
||||
new_img->fill(boot_bg_color);
|
||||
_blend_and_rotate(new_img, img, false);
|
||||
err = new_img->save_png(p_dest_dir + info.export_name);
|
||||
} else {
|
||||
err = da->copy(loading_screen_file, p_dest_dir + info.export_name);
|
||||
}
|
||||
err = da->copy(loading_screen_file, p_dest_dir + info.export_name);
|
||||
if (err) {
|
||||
memdelete(da);
|
||||
String err_str = String("Failed to export loading screen (") + info.preset_key + ") from path '" + loading_screen_file + "'.";
|
||||
ERR_PRINT(err_str.utf8().get_data());
|
||||
return err;
|
||||
}
|
||||
} else if ((bool)p_preset->get("launch_screens/generate_missing")) {
|
||||
} else {
|
||||
// Generate loading screen from the splash screen
|
||||
Color boot_bg_color = ProjectSettings::get_singleton()->get("application/boot_splash/bg_color");
|
||||
String boot_logo_path = ProjectSettings::get_singleton()->get("application/boot_splash/image");
|
||||
bool boot_logo_scale = ProjectSettings::get_singleton()->get("application/boot_splash/fullsize");
|
||||
|
||||
Ref<Image> img = memnew(Image);
|
||||
img->create(info.width, info.height, false, Image::FORMAT_RGBA8);
|
||||
img->fill(boot_bg_color);
|
||||
@ -988,9 +989,6 @@ Error EditorExportPlatformIOS::_export_loading_screen_images(const Ref<EditorExp
|
||||
String err_str = String("Failed to export loading screen (") + info.preset_key + ") from splash screen.";
|
||||
WARN_PRINT(err_str.utf8().get_data());
|
||||
}
|
||||
} else {
|
||||
String err_str = String("No loading screen (") + info.preset_key + ") specified.";
|
||||
WARN_PRINT(err_str.utf8().get_data());
|
||||
}
|
||||
}
|
||||
memdelete(da);
|
||||
@ -2027,18 +2025,6 @@ bool EditorExportPlatformIOS::can_export(const Ref<EditorExportPreset> &p_preset
|
||||
valid = false;
|
||||
}
|
||||
|
||||
for (uint64_t i = 0; i < (sizeof(icon_infos) / sizeof(icon_infos[0])); ++i) {
|
||||
IconInfo info = icon_infos[i];
|
||||
String icon_path = p_preset->get(info.preset_key);
|
||||
if (icon_path.length() == 0) {
|
||||
if (info.is_required) {
|
||||
err += TTR("Required icon is not specified in the preset.") + "\n";
|
||||
valid = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
String etc_error = test_etc2_or_pvrtc();
|
||||
if (etc_error != String()) {
|
||||
valid = false;
|
||||
|
@ -1963,6 +1963,7 @@ Node *Node::_duplicate(int p_flags, Map<const Node *, Node *> *r_duplimap) const
|
||||
#endif
|
||||
node = res->instance(ges);
|
||||
ERR_FAIL_COND_V(!node, nullptr);
|
||||
node->set_scene_instance_load_placeholder(get_scene_instance_load_placeholder());
|
||||
|
||||
instanced = true;
|
||||
|
||||
|
@ -175,14 +175,12 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
Object *obj = nullptr;
|
||||
//node belongs to this scene and must be created
|
||||
Object *obj = ClassDB::instance(snames[n.type]);
|
||||
|
||||
if (ClassDB::is_class_enabled(snames[n.type])) {
|
||||
//node belongs to this scene and must be created
|
||||
obj = ClassDB::instance(snames[n.type]);
|
||||
}
|
||||
node = Object::cast_to<Node>(obj);
|
||||
|
||||
if (!Object::cast_to<Node>(obj)) {
|
||||
if (!node) {
|
||||
if (obj) {
|
||||
memdelete(obj);
|
||||
obj = nullptr;
|
||||
@ -201,9 +199,9 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
|
||||
if (!obj) {
|
||||
obj = memnew(Node);
|
||||
}
|
||||
}
|
||||
|
||||
node = Object::cast_to<Node>(obj);
|
||||
node = Object::cast_to<Node>(obj);
|
||||
}
|
||||
}
|
||||
|
||||
if (node) {
|
||||
|
@ -1184,7 +1184,7 @@ void VisualServerCanvas::canvas_light_occluder_set_polygon(RID p_occluder, RID p
|
||||
ERR_FAIL_COND(!occluder);
|
||||
|
||||
if (occluder->polygon.is_valid()) {
|
||||
LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get(p_polygon);
|
||||
LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get(occluder->polygon);
|
||||
if (occluder_poly) {
|
||||
occluder_poly->owners.erase(occluder);
|
||||
}
|
||||
|
15
thirdparty/README.md
vendored
15
thirdparty/README.md
vendored
@ -118,14 +118,14 @@ comments.
|
||||
## freetype
|
||||
|
||||
- Upstream: https://www.freetype.org
|
||||
- Version: 2.10.4 (6a2b3e4007e794bfc6c91030d0ed987f925164a8, 2020)
|
||||
- Version: 2.11.1 (3f83daeecb1a78d851b660eed025eeba362c0e4a, 2021)
|
||||
- License: FreeType License (BSD-like)
|
||||
|
||||
Files extracted from upstream source:
|
||||
|
||||
- the `src/` folder, stripped of the `Jamfile` files and the `tools` subfolder
|
||||
- the `include/` folder
|
||||
- `docs/{FTL.TXT,LICENSE.TXT}`
|
||||
- the `src/` folder, minus the `.mk` files and the `dlg` and `tools` subfolders
|
||||
- the `include/` folder, minus the `dlg` subfolder
|
||||
- `LICENSE.TXT` and `docs/FTL.TXT`
|
||||
|
||||
|
||||
## glad
|
||||
@ -267,14 +267,11 @@ changes are marked with `// -- GODOT --` comments.
|
||||
|
||||
File extracted from upstream release tarball:
|
||||
|
||||
- All `*.h` from `include/mbedtls/` to `thirdparty/mbedtls/include/mbedtls/`.
|
||||
- All `*.c` from `library/` to `thirdparty/mbedtls/library/`.
|
||||
- All `*.h` from `include/mbedtls/` to `thirdparty/mbedtls/include/mbedtls/` except `config_psa.h` and `psa_util.h`.
|
||||
- All `*.c` and `*.h` from `library/` to `thirdparty/mbedtls/library/` except those starting with `psa_*`.
|
||||
- `LICENSE` and `apache-2.0.txt` files.
|
||||
- Applied the patch in `patches/1453.diff` (upstream PR:
|
||||
https://github.com/ARMmbed/mbedtls/pull/1453).
|
||||
- Applied the patch in `patches/padlock.diff`. This disables VIA padlock
|
||||
support which defines a symbol `unsupported` which clashes with a
|
||||
pre-defined symbol.
|
||||
- Added 2 files `godot_core_mbedtls_platform.c` and `godot_core_mbedtls_config.h`
|
||||
providing configuration for light bundling with core.
|
||||
|
||||
|
53
thirdparty/freetype/LICENSE.TXT
vendored
53
thirdparty/freetype/LICENSE.TXT
vendored
@ -1,39 +1,42 @@
|
||||
FREETYPE LICENSES
|
||||
-----------------
|
||||
|
||||
The FreeType 2 font engine is copyrighted work and cannot be used
|
||||
legally without a software license. In order to make this project
|
||||
usable to a vast majority of developers, we distribute it under two
|
||||
The FreeType 2 font engine is copyrighted work and cannot be used
|
||||
legally without a software license. In order to make this project
|
||||
usable to a vast majority of developers, we distribute it under two
|
||||
mutually exclusive open-source licenses.
|
||||
|
||||
This means that *you* must choose *one* of the two licenses described
|
||||
below, then obey all its terms and conditions when using FreeType 2 in
|
||||
This means that *you* must choose *one* of the two licenses described
|
||||
below, then obey all its terms and conditions when using FreeType 2 in
|
||||
any of your projects or products.
|
||||
|
||||
- The FreeType License, found in the file `FTL.TXT', which is similar
|
||||
to the original BSD license *with* an advertising clause that forces
|
||||
you to explicitly cite the FreeType project in your product's
|
||||
documentation. All details are in the license file. This license
|
||||
is suited to products which don't use the GNU General Public
|
||||
License.
|
||||
- The FreeType License, found in the file `docs/FTL.TXT`, which is
|
||||
similar to the original BSD license *with* an advertising clause
|
||||
that forces you to explicitly cite the FreeType project in your
|
||||
product's documentation. All details are in the license file.
|
||||
This license is suited to products which don't use the GNU General
|
||||
Public License.
|
||||
|
||||
Note that this license is compatible to the GNU General Public
|
||||
Note that this license is compatible to the GNU General Public
|
||||
License version 3, but not version 2.
|
||||
|
||||
- The GNU General Public License version 2, found in `GPLv2.TXT' (any
|
||||
later version can be used also), for programs which already use the
|
||||
GPL. Note that the FTL is incompatible with GPLv2 due to its
|
||||
advertisement clause.
|
||||
- The GNU General Public License version 2, found in
|
||||
`docs/GPLv2.TXT` (any later version can be used also), for
|
||||
programs which already use the GPL. Note that the FTL is
|
||||
incompatible with GPLv2 due to its advertisement clause.
|
||||
|
||||
The contributed BDF and PCF drivers come with a license similar to that
|
||||
of the X Window System. It is compatible to the above two licenses (see
|
||||
file src/bdf/README and src/pcf/README). The same holds for the files
|
||||
`fthash.c' and `fthash.h'; their code was part of the BDF driver in
|
||||
earlier FreeType versions.
|
||||
The contributed BDF and PCF drivers come with a license similar to
|
||||
that of the X Window System. It is compatible to the above two
|
||||
licenses (see files `src/bdf/README` and `src/pcf/README`). The same
|
||||
holds for the source code files `src/base/fthash.c` and
|
||||
`include/freetype/internal/fthash.h`; they wer part of the BDF driver
|
||||
in earlier FreeType versions.
|
||||
|
||||
The gzip module uses the zlib license (see src/gzip/zlib.h) which too is
|
||||
compatible to the above two licenses.
|
||||
The gzip module uses the zlib license (see `src/gzip/zlib.h`) which
|
||||
too is compatible to the above two licenses.
|
||||
|
||||
The MD5 checksum support (only used for debugging in development builds)
|
||||
is in the public domain.
|
||||
The MD5 checksum support (only used for debugging in development
|
||||
builds) is in the public domain.
|
||||
|
||||
|
||||
--- end of LICENSE.TXT ---
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* ANSI-specific configuration file (specification only).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Build macros of the FreeType 2 library.
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -19,12 +19,14 @@ FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
|
||||
FT_USE_MODULE( FT_Module_Class, psaux_module_class )
|
||||
FT_USE_MODULE( FT_Module_Class, psnames_module_class )
|
||||
FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
|
||||
FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_sdf_renderer_class )
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_bitmap_sdf_renderer_class )
|
||||
|
||||
/* EOF */
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* User-selectable configuration macros (specification only).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -105,8 +105,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* ```
|
||||
* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
|
||||
* cff:no-stem-darkening=1 \
|
||||
* autofitter:warping=1
|
||||
* cff:no-stem-darkening=1
|
||||
* ```
|
||||
*
|
||||
*/
|
||||
@ -431,6 +430,23 @@ FT_BEGIN_HEADER
|
||||
/* #define FT_DEBUG_LEVEL_TRACE */
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Logging
|
||||
*
|
||||
* Compiling FreeType in debug or trace mode makes FreeType write error
|
||||
* and trace log messages to `stderr`. Enabling this macro
|
||||
* automatically forces the `FT_DEBUG_LEVEL_ERROR` and
|
||||
* `FT_DEBUG_LEVEL_TRACE` macros and allows FreeType to write error and
|
||||
* trace log messages to a file instead of `stderr`. For writing logs
|
||||
* to a file, FreeType uses an the external `dlg` library (the source
|
||||
* code is in `src/dlg`).
|
||||
*
|
||||
* This option needs a C99 compiler.
|
||||
*/
|
||||
/* #define FT_DEBUG_LOGGING */
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Autofitter debugging
|
||||
@ -892,24 +908,6 @@ FT_BEGIN_HEADER
|
||||
#endif
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Compile 'autofit' module with warp hinting. The idea of the warping
|
||||
* code is to slightly scale and shift a glyph within a single dimension so
|
||||
* that as much of its segments are aligned (more or less) on the grid. To
|
||||
* find out the optimal scaling and shifting value, various parameter
|
||||
* combinations are tried and scored.
|
||||
*
|
||||
* You can switch warping on and off with the `warping` property of the
|
||||
* auto-hinter (see file `ftdriver.h` for more information; by default it
|
||||
* is switched off).
|
||||
*
|
||||
* This experimental option is not active if the rendering mode is
|
||||
* `FT_RENDER_MODE_LIGHT`.
|
||||
*/
|
||||
#define AF_CONFIG_OPTION_USE_WARPER
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Use TrueType-like size metrics for 'light' auto-hinting.
|
||||
@ -961,6 +959,21 @@ FT_BEGIN_HEADER
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* The TT_SUPPORT_COLRV1 macro is defined to indicate to clients that this
|
||||
* version of FreeType has support for 'COLR' v1 API. This definition is
|
||||
* useful to FreeType clients that want to build in support for 'COLR' v1
|
||||
* depending on a tip-of-tree checkout before it is officially released in
|
||||
* FreeType, and while the feature cannot yet be tested against using
|
||||
* version macros. Don't change this macro. This may be removed once the
|
||||
* feature is in a FreeType release version and version macros can be used
|
||||
* to test for availability.
|
||||
*/
|
||||
#ifdef TT_CONFIG_OPTION_COLOR_LAYERS
|
||||
#define TT_SUPPORT_COLRV1
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Check CFF darkening parameters. The checks are the same as in function
|
||||
* `cff_property_set` in file `cffdrivr.c`.
|
||||
|
@ -5,7 +5,7 @@
|
||||
* ANSI-specific library and header configuration file (specification
|
||||
* only).
|
||||
*
|
||||
* Copyright (C) 2002-2020 by
|
||||
* Copyright (C) 2002-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -43,7 +43,8 @@
|
||||
*
|
||||
* `UINT_MAX` and `ULONG_MAX` are used to automatically compute the size of
|
||||
* `int` and `long` in bytes at compile-time. So far, this works for all
|
||||
* platforms the library has been tested on.
|
||||
* platforms the library has been tested on. We also check `ULLONG_MAX`
|
||||
* to see whether we can use 64-bit `long long` later on.
|
||||
*
|
||||
* Note that on the extremely rare platforms that do not provide integer
|
||||
* types that are _exactly_ 16 and 32~bits wide (e.g., some old Crays where
|
||||
@ -66,6 +67,15 @@
|
||||
#define FT_LONG_MIN LONG_MIN
|
||||
#define FT_LONG_MAX LONG_MAX
|
||||
#define FT_ULONG_MAX ULONG_MAX
|
||||
#ifdef LLONG_MAX
|
||||
#define FT_LLONG_MAX LLONG_MAX
|
||||
#endif
|
||||
#ifdef LLONG_MIN
|
||||
#define FT_LLONG_MIN LLONG_MIN
|
||||
#endif
|
||||
#ifdef ULLONG_MAX
|
||||
#define FT_ULLONG_MAX ULLONG_MAX
|
||||
#endif
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType integer types definitions.
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -60,6 +60,18 @@
|
||||
|
||||
#endif /* !defined(FT_SIZEOF_LONG) */
|
||||
|
||||
#ifndef FT_SIZEOF_LONG_LONG
|
||||
|
||||
/* The size of a `long long` type if available */
|
||||
#if defined( FT_ULLONG_MAX ) && FT_ULLONG_MAX >= 0xFFFFFFFFFFFFFFFFULL
|
||||
#define FT_SIZEOF_LONG_LONG ( 64 / FT_CHAR_BIT )
|
||||
#else
|
||||
#define FT_SIZEOF_LONG_LONG 0
|
||||
#endif
|
||||
|
||||
#endif /* !defined(FT_SIZEOF_LONG_LONG) */
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @section:
|
||||
@ -174,15 +186,17 @@
|
||||
#endif
|
||||
|
||||
|
||||
/* determine whether we have a 64-bit `int` type for platforms without */
|
||||
/* Autoconf */
|
||||
/* determine whether we have a 64-bit integer type */
|
||||
#if FT_SIZEOF_LONG == ( 64 / FT_CHAR_BIT )
|
||||
|
||||
/* `FT_LONG64` must be defined if a 64-bit type is available */
|
||||
#define FT_LONG64
|
||||
#define FT_INT64 long
|
||||
#define FT_UINT64 unsigned long
|
||||
|
||||
#elif FT_SIZEOF_LONG_LONG >= ( 64 / FT_CHAR_BIT )
|
||||
|
||||
#define FT_INT64 long long int
|
||||
#define FT_UINT64 unsigned long long int
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* A 64-bit data type may create compilation problems if you compile in
|
||||
@ -192,16 +206,9 @@
|
||||
*/
|
||||
#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
|
||||
|
||||
#if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
|
||||
|
||||
#define FT_LONG64
|
||||
#define FT_INT64 long long int
|
||||
#define FT_UINT64 unsigned long long int
|
||||
|
||||
#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
|
||||
#if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
|
||||
|
||||
/* this compiler provides the `__int64` type */
|
||||
#define FT_LONG64
|
||||
#define FT_INT64 __int64
|
||||
#define FT_UINT64 unsigned __int64
|
||||
|
||||
@ -211,7 +218,6 @@
|
||||
/* to test the compiler version. */
|
||||
|
||||
/* this compiler provides the `__int64` type */
|
||||
#define FT_LONG64
|
||||
#define FT_INT64 __int64
|
||||
#define FT_UINT64 unsigned __int64
|
||||
|
||||
@ -221,22 +227,20 @@
|
||||
|
||||
#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
|
||||
|
||||
#define FT_LONG64
|
||||
#define FT_INT64 long long int
|
||||
#define FT_UINT64 unsigned long long int
|
||||
|
||||
#elif defined( __GNUC__ )
|
||||
|
||||
/* GCC provides the `long long` type */
|
||||
#define FT_LONG64
|
||||
#define FT_INT64 long long int
|
||||
#define FT_UINT64 unsigned long long int
|
||||
|
||||
#endif /* __STDC_VERSION__ >= 199901L */
|
||||
#endif /* !__STDC__ */
|
||||
|
||||
#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
|
||||
|
||||
#ifdef FT_LONG64
|
||||
#ifdef FT_INT64
|
||||
typedef FT_INT64 FT_Int64;
|
||||
typedef FT_UINT64 FT_UInt64;
|
||||
#endif
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Mac/OS X support configuration header.
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Define a set of compiler macros used in public FreeType headers.
|
||||
*
|
||||
* Copyright (C) 2020 by
|
||||
* Copyright (C) 2020-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -103,6 +103,7 @@ FT_BEGIN_HEADER
|
||||
*/
|
||||
#define FT_EXPORT( x ) FT_PUBLIC_FUNCTION_ATTRIBUTE extern x
|
||||
|
||||
|
||||
/*
|
||||
* `FT_UNUSED` indicates that a given parameter is not used -- this is
|
||||
* only used to get rid of unpleasant compiler warnings.
|
||||
@ -115,6 +116,23 @@ FT_BEGIN_HEADER
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Support for casts in both C and C++.
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
#define FT_STATIC_CAST( type, var ) static_cast<type>(var)
|
||||
#define FT_REINTERPRET_CAST( type, var ) reinterpret_cast<type>(var)
|
||||
|
||||
#define FT_STATIC_BYTE_CAST( type, var ) \
|
||||
static_cast<type>( static_cast<unsigned char>( var ) )
|
||||
#else
|
||||
#define FT_STATIC_CAST( type, var ) (type)(var)
|
||||
#define FT_REINTERPRET_CAST( type, var ) (type)(var)
|
||||
|
||||
#define FT_STATIC_BYTE_CAST( type, var ) (type)(unsigned char)(var)
|
||||
#endif
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* FREETYPE_CONFIG_PUBLIC_MACROS_H_ */
|
||||
|
343
thirdparty/freetype/include/freetype/freetype.h
vendored
343
thirdparty/freetype/include/freetype/freetype.h
vendored
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType high-level API and common types (specification only).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -30,6 +30,34 @@ FT_BEGIN_HEADER
|
||||
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @section:
|
||||
* preamble
|
||||
*
|
||||
* @title:
|
||||
* Preamble
|
||||
*
|
||||
* @abstract:
|
||||
* What FreeType is and isn't
|
||||
*
|
||||
* @description:
|
||||
* FreeType is a library that provides access to glyphs in font files. It
|
||||
* scales the glyph images and their metrics to a requested size, and it
|
||||
* rasterizes the glyph images to produce pixel or subpixel alpha coverage
|
||||
* bitmaps.
|
||||
*
|
||||
* Note that FreeType is _not_ a text layout engine. You have to use
|
||||
* higher-level libraries like HarfBuzz, Pango, or ICU for that.
|
||||
*
|
||||
* Note also that FreeType does _not_ perform alpha blending or
|
||||
* compositing the resulting bitmaps or pixmaps by itself. Use your
|
||||
* favourite graphics library (for example, Cairo or Skia) to further
|
||||
* process FreeType's output.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @section:
|
||||
@ -176,6 +204,7 @@ FT_BEGIN_HEADER
|
||||
* FT_Size_RequestRec
|
||||
* FT_Size_Request
|
||||
* FT_Set_Transform
|
||||
* FT_Get_Transform
|
||||
* FT_Load_Glyph
|
||||
* FT_Get_Char_Index
|
||||
* FT_Get_First_Char
|
||||
@ -587,11 +616,12 @@ FT_BEGIN_HEADER
|
||||
*/
|
||||
|
||||
#ifndef FT_ENC_TAG
|
||||
#define FT_ENC_TAG( value, a, b, c, d ) \
|
||||
value = ( ( (FT_UInt32)(a) << 24 ) | \
|
||||
( (FT_UInt32)(b) << 16 ) | \
|
||||
( (FT_UInt32)(c) << 8 ) | \
|
||||
(FT_UInt32)(d) )
|
||||
|
||||
#define FT_ENC_TAG( value, a, b, c, d ) \
|
||||
value = ( ( FT_STATIC_BYTE_CAST( FT_UInt32, a ) << 24 ) | \
|
||||
( FT_STATIC_BYTE_CAST( FT_UInt32, b ) << 16 ) | \
|
||||
( FT_STATIC_BYTE_CAST( FT_UInt32, c ) << 8 ) | \
|
||||
FT_STATIC_BYTE_CAST( FT_UInt32, d ) )
|
||||
|
||||
#endif /* FT_ENC_TAG */
|
||||
|
||||
@ -701,11 +731,16 @@ FT_BEGIN_HEADER
|
||||
* Same as FT_ENCODING_JOHAB. Deprecated.
|
||||
*
|
||||
* @note:
|
||||
* By default, FreeType enables a Unicode charmap and tags it with
|
||||
* `FT_ENCODING_UNICODE` when it is either provided or can be generated
|
||||
* from PostScript glyph name dictionaries in the font file. All other
|
||||
* encodings are considered legacy and tagged only if explicitly defined
|
||||
* in the font file. Otherwise, `FT_ENCODING_NONE` is used.
|
||||
* When loading a font, FreeType makes a Unicode charmap active if
|
||||
* possible (either if the font provides such a charmap, or if FreeType
|
||||
* can synthesize one from PostScript glyph name dictionaries; in either
|
||||
* case, the charmap is tagged with `FT_ENCODING_UNICODE`). If such a
|
||||
* charmap is synthesized, it is placed at the first position of the
|
||||
* charmap array.
|
||||
*
|
||||
* All other encodings are considered legacy and tagged only if
|
||||
* explicitly defined in the font file. Otherwise, `FT_ENCODING_NONE` is
|
||||
* used.
|
||||
*
|
||||
* `FT_ENCODING_NONE` is set by the BDF and PCF drivers if the charmap is
|
||||
* neither Unicode nor ISO-8859-1 (otherwise it is set to
|
||||
@ -2065,7 +2100,8 @@ FT_BEGIN_HEADER
|
||||
* The size in bytes of the file in memory.
|
||||
*
|
||||
* pathname ::
|
||||
* A pointer to an 8-bit file pathname. The pointer is not owned by
|
||||
* A pointer to an 8-bit file pathname, which must be a C~string (i.e.,
|
||||
* no null bytes except at the very end). The pointer is not owned by
|
||||
* FreeType.
|
||||
*
|
||||
* stream ::
|
||||
@ -2084,8 +2120,7 @@ FT_BEGIN_HEADER
|
||||
* Extra parameters passed to the font driver when opening a new face.
|
||||
*
|
||||
* @note:
|
||||
* The stream type is determined by the contents of `flags` that are
|
||||
* tested in the following order by @FT_Open_Face:
|
||||
* The stream type is determined by the contents of `flags`:
|
||||
*
|
||||
* If the @FT_OPEN_MEMORY bit is set, assume that this is a memory file
|
||||
* of `memory_size` bytes, located at `memory_address`. The data are not
|
||||
@ -2098,6 +2133,9 @@ FT_BEGIN_HEADER
|
||||
* Otherwise, if the @FT_OPEN_PATHNAME bit is set, assume that this is a
|
||||
* normal file and use `pathname` to open it.
|
||||
*
|
||||
* If none of the above bits are set or if multiple are set at the same
|
||||
* time, the flags are invalid and @FT_Open_Face fails.
|
||||
*
|
||||
* If the @FT_OPEN_DRIVER bit is set, @FT_Open_Face only tries to open
|
||||
* the file with the driver whose handler is in `driver`.
|
||||
*
|
||||
@ -2150,6 +2188,13 @@ FT_BEGIN_HEADER
|
||||
* FreeType error code. 0~means success.
|
||||
*
|
||||
* @note:
|
||||
* The `pathname` string should be recognizable as such by a standard
|
||||
* `fopen` call on your system; in particular, this means that `pathname`
|
||||
* must not contain null bytes. If that is not sufficient to address all
|
||||
* file name possibilities (for example, to handle wide character file
|
||||
* names on Windows in UTF-16 encoding) you might use @FT_Open_Face to
|
||||
* pass a memory array or a stream object instead.
|
||||
*
|
||||
* Use @FT_Done_Face to destroy the created @FT_Face object (along with
|
||||
* its slot and sizes).
|
||||
*/
|
||||
@ -2270,6 +2315,10 @@ FT_BEGIN_HEADER
|
||||
* See the discussion of reference counters in the description of
|
||||
* @FT_Reference_Face.
|
||||
*
|
||||
* If `FT_OPEN_STREAM` is set in `args->flags`, the stream in
|
||||
* `args->stream` is automatically closed before this function returns
|
||||
* any error (including `FT_Err_Invalid_Argument`).
|
||||
*
|
||||
* @example:
|
||||
* To loop over all faces, use code similar to the following snippet
|
||||
* (omitting the error handling).
|
||||
@ -2428,6 +2477,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @since:
|
||||
* 2.4.2
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Reference_Face( FT_Face face );
|
||||
@ -2874,7 +2924,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* If the font is 'tricky' (see @FT_FACE_FLAG_TRICKY for more), using
|
||||
* `FT_LOAD_NO_SCALE` usually yields meaningless outlines because the
|
||||
* subglyphs must be scaled and positioned with hinting instructions.
|
||||
* subglyphs must be scaled and positioned with hinting instructions.
|
||||
* This can be solved by loading the font without `FT_LOAD_NO_SCALE`
|
||||
* and setting the character size to `font->units_per_EM`.
|
||||
*
|
||||
@ -3132,7 +3182,7 @@ FT_BEGIN_HEADER
|
||||
* necessary to empty the cache after a mode switch to avoid false hits.
|
||||
*
|
||||
*/
|
||||
#define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 15 ) << 16 )
|
||||
#define FT_LOAD_TARGET_( x ) ( FT_STATIC_CAST( FT_Int32, (x) & 15 ) << 16 )
|
||||
|
||||
#define FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )
|
||||
#define FT_LOAD_TARGET_LIGHT FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT )
|
||||
@ -3151,7 +3201,8 @@ FT_BEGIN_HEADER
|
||||
* @FT_LOAD_TARGET_XXX value.
|
||||
*
|
||||
*/
|
||||
#define FT_LOAD_TARGET_MODE( x ) ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) )
|
||||
#define FT_LOAD_TARGET_MODE( x ) \
|
||||
FT_STATIC_CAST( FT_Render_Mode, ( (x) >> 16 ) & 15 )
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
@ -3172,11 +3223,12 @@ FT_BEGIN_HEADER
|
||||
* A pointer to the transformation's 2x2 matrix. Use `NULL` for the
|
||||
* identity matrix.
|
||||
* delta ::
|
||||
* A pointer to the translation vector. Use `NULL` for the null vector.
|
||||
* A pointer to the translation vector. Use `NULL` for the null
|
||||
* vector.
|
||||
*
|
||||
* @note:
|
||||
* This function is provided as a convenience, but keep in mind that
|
||||
* @FT_Matrix coefficients are only 16.16 fixed point values, which can
|
||||
* @FT_Matrix coefficients are only 16.16 fixed-point values, which can
|
||||
* limit the accuracy of the results. Using floating-point computations
|
||||
* to perform the transform directly in client code instead will always
|
||||
* yield better numbers.
|
||||
@ -3195,6 +3247,39 @@ FT_BEGIN_HEADER
|
||||
FT_Vector* delta );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @function:
|
||||
* FT_Get_Transform
|
||||
*
|
||||
* @description:
|
||||
* Return the transformation that is applied to glyph images when they
|
||||
* are loaded into a glyph slot through @FT_Load_Glyph. See
|
||||
* @FT_Set_Transform for more details.
|
||||
*
|
||||
* @input:
|
||||
* face ::
|
||||
* A handle to the source face object.
|
||||
*
|
||||
* @output:
|
||||
* matrix ::
|
||||
* A pointer to a transformation's 2x2 matrix. Set this to NULL if you
|
||||
* are not interested in the value.
|
||||
*
|
||||
* delta ::
|
||||
* A pointer a translation vector. Set this to NULL if you are not
|
||||
* interested in the value.
|
||||
*
|
||||
* @since:
|
||||
* 2.11
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( void )
|
||||
FT_Get_Transform( FT_Face face,
|
||||
FT_Matrix* matrix,
|
||||
FT_Vector* delta );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @enum:
|
||||
@ -3213,6 +3298,10 @@ FT_BEGIN_HEADER
|
||||
* correction to correctly render non-monochrome glyph bitmaps onto a
|
||||
* surface; see @FT_Render_Glyph.
|
||||
*
|
||||
* The @FT_RENDER_MODE_SDF is a special render mode that uses up to 256
|
||||
* distance values, indicating the signed distance from the grid position
|
||||
* to the nearest outline.
|
||||
*
|
||||
* @values:
|
||||
* FT_RENDER_MODE_NORMAL ::
|
||||
* Default render mode; it corresponds to 8-bit anti-aliased bitmaps.
|
||||
@ -3238,11 +3327,49 @@ FT_BEGIN_HEADER
|
||||
* bitmaps that are 3~times the height of the original glyph outline in
|
||||
* pixels and use the @FT_PIXEL_MODE_LCD_V mode.
|
||||
*
|
||||
* FT_RENDER_MODE_SDF ::
|
||||
* This mode corresponds to 8-bit, single-channel signed distance field
|
||||
* (SDF) bitmaps. Each pixel in the SDF grid is the value from the
|
||||
* pixel's position to the nearest glyph's outline. The distances are
|
||||
* calculated from the center of the pixel and are positive if they are
|
||||
* filled by the outline (i.e., inside the outline) and negative
|
||||
* otherwise. Check the note below on how to convert the output values
|
||||
* to usable data.
|
||||
*
|
||||
* @note:
|
||||
* The selected render mode only affects vector glyphs of a font.
|
||||
* Embedded bitmaps often have a different pixel mode like
|
||||
* @FT_PIXEL_MODE_MONO. You can use @FT_Bitmap_Convert to transform them
|
||||
* into 8-bit pixmaps.
|
||||
*
|
||||
* For @FT_RENDER_MODE_SDF the output bitmap buffer contains normalized
|
||||
* distances that are packed into unsigned 8-bit values. To get pixel
|
||||
* values in floating point representation use the following pseudo-C
|
||||
* code for the conversion.
|
||||
*
|
||||
* ```
|
||||
* // Load glyph and render using FT_RENDER_MODE_SDF,
|
||||
* // then use the output buffer as follows.
|
||||
*
|
||||
* ...
|
||||
* FT_Byte buffer = glyph->bitmap->buffer;
|
||||
*
|
||||
*
|
||||
* for pixel in buffer
|
||||
* {
|
||||
* // `sd` is the signed distance and `spread` is the current spread;
|
||||
* // the default spread is 2 and can be changed.
|
||||
*
|
||||
* float sd = (float)pixel - 128.0f;
|
||||
*
|
||||
*
|
||||
* // Convert to pixel values.
|
||||
* sd = ( sd / 128.0f ) * spread;
|
||||
*
|
||||
* // Store `sd` in a buffer or use as required.
|
||||
* }
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
typedef enum FT_Render_Mode_
|
||||
{
|
||||
@ -3251,6 +3378,7 @@ FT_BEGIN_HEADER
|
||||
FT_RENDER_MODE_MONO,
|
||||
FT_RENDER_MODE_LCD,
|
||||
FT_RENDER_MODE_LCD_V,
|
||||
FT_RENDER_MODE_SDF,
|
||||
|
||||
FT_RENDER_MODE_MAX
|
||||
|
||||
@ -3338,7 +3466,8 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* which is known as the OVER operator.
|
||||
*
|
||||
* To correctly composite an antialiased pixel of a glyph onto a surface,
|
||||
* To correctly composite an anti-aliased pixel of a glyph onto a
|
||||
* surface,
|
||||
*
|
||||
* 1. take the foreground and background colors (e.g., in sRGB space)
|
||||
* and apply gamma to get them in a linear space,
|
||||
@ -4015,168 +4144,6 @@ FT_BEGIN_HEADER
|
||||
FT_Matrix *p_transform );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @section:
|
||||
* layer_management
|
||||
*
|
||||
* @title:
|
||||
* Glyph Layer Management
|
||||
*
|
||||
* @abstract:
|
||||
* Retrieving and manipulating OpenType's 'COLR' table data.
|
||||
*
|
||||
* @description:
|
||||
* The functions described here allow access of colored glyph layer data
|
||||
* in OpenType's 'COLR' tables.
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @struct:
|
||||
* FT_LayerIterator
|
||||
*
|
||||
* @description:
|
||||
* This iterator object is needed for @FT_Get_Color_Glyph_Layer.
|
||||
*
|
||||
* @fields:
|
||||
* num_layers ::
|
||||
* The number of glyph layers for the requested glyph index. Will be
|
||||
* set by @FT_Get_Color_Glyph_Layer.
|
||||
*
|
||||
* layer ::
|
||||
* The current layer. Will be set by @FT_Get_Color_Glyph_Layer.
|
||||
*
|
||||
* p ::
|
||||
* An opaque pointer into 'COLR' table data. The caller must set this
|
||||
* to `NULL` before the first call of @FT_Get_Color_Glyph_Layer.
|
||||
*/
|
||||
typedef struct FT_LayerIterator_
|
||||
{
|
||||
FT_UInt num_layers;
|
||||
FT_UInt layer;
|
||||
FT_Byte* p;
|
||||
|
||||
} FT_LayerIterator;
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @function:
|
||||
* FT_Get_Color_Glyph_Layer
|
||||
*
|
||||
* @description:
|
||||
* This is an interface to the 'COLR' table in OpenType fonts to
|
||||
* iteratively retrieve the colored glyph layers associated with the
|
||||
* current glyph slot.
|
||||
*
|
||||
* https://docs.microsoft.com/en-us/typography/opentype/spec/colr
|
||||
*
|
||||
* The glyph layer data for a given glyph index, if present, provides an
|
||||
* alternative, multi-color glyph representation: Instead of rendering
|
||||
* the outline or bitmap with the given glyph index, glyphs with the
|
||||
* indices and colors returned by this function are rendered layer by
|
||||
* layer.
|
||||
*
|
||||
* The returned elements are ordered in the z~direction from bottom to
|
||||
* top; the 'n'th element should be rendered with the associated palette
|
||||
* color and blended on top of the already rendered layers (elements 0,
|
||||
* 1, ..., n-1).
|
||||
*
|
||||
* @input:
|
||||
* face ::
|
||||
* A handle to the parent face object.
|
||||
*
|
||||
* base_glyph ::
|
||||
* The glyph index the colored glyph layers are associated with.
|
||||
*
|
||||
* @inout:
|
||||
* iterator ::
|
||||
* An @FT_LayerIterator object. For the first call you should set
|
||||
* `iterator->p` to `NULL`. For all following calls, simply use the
|
||||
* same object again.
|
||||
*
|
||||
* @output:
|
||||
* aglyph_index ::
|
||||
* The glyph index of the current layer.
|
||||
*
|
||||
* acolor_index ::
|
||||
* The color index into the font face's color palette of the current
|
||||
* layer. The value 0xFFFF is special; it doesn't reference a palette
|
||||
* entry but indicates that the text foreground color should be used
|
||||
* instead (to be set up by the application outside of FreeType).
|
||||
*
|
||||
* The color palette can be retrieved with @FT_Palette_Select.
|
||||
*
|
||||
* @return:
|
||||
* Value~1 if everything is OK. If there are no more layers (or if there
|
||||
* are no layers at all), value~0 gets returned. In case of an error,
|
||||
* value~0 is returned also.
|
||||
*
|
||||
* @note:
|
||||
* This function is necessary if you want to handle glyph layers by
|
||||
* yourself. In particular, functions that operate with @FT_GlyphRec
|
||||
* objects (like @FT_Get_Glyph or @FT_Glyph_To_Bitmap) don't have access
|
||||
* to this information.
|
||||
*
|
||||
* Note that @FT_Render_Glyph is able to handle colored glyph layers
|
||||
* automatically if the @FT_LOAD_COLOR flag is passed to a previous call
|
||||
* to @FT_Load_Glyph. [This is an experimental feature.]
|
||||
*
|
||||
* @example:
|
||||
* ```
|
||||
* FT_Color* palette;
|
||||
* FT_LayerIterator iterator;
|
||||
*
|
||||
* FT_Bool have_layers;
|
||||
* FT_UInt layer_glyph_index;
|
||||
* FT_UInt layer_color_index;
|
||||
*
|
||||
*
|
||||
* error = FT_Palette_Select( face, palette_index, &palette );
|
||||
* if ( error )
|
||||
* palette = NULL;
|
||||
*
|
||||
* iterator.p = NULL;
|
||||
* have_layers = FT_Get_Color_Glyph_Layer( face,
|
||||
* glyph_index,
|
||||
* &layer_glyph_index,
|
||||
* &layer_color_index,
|
||||
* &iterator );
|
||||
*
|
||||
* if ( palette && have_layers )
|
||||
* {
|
||||
* do
|
||||
* {
|
||||
* FT_Color layer_color;
|
||||
*
|
||||
*
|
||||
* if ( layer_color_index == 0xFFFF )
|
||||
* layer_color = text_foreground_color;
|
||||
* else
|
||||
* layer_color = palette[layer_color_index];
|
||||
*
|
||||
* // Load and render glyph `layer_glyph_index', then
|
||||
* // blend resulting pixmap (using color `layer_color')
|
||||
* // with previously created pixmaps.
|
||||
*
|
||||
* } while ( FT_Get_Color_Glyph_Layer( face,
|
||||
* glyph_index,
|
||||
* &layer_glyph_index,
|
||||
* &layer_color_index,
|
||||
* &iterator ) );
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
FT_EXPORT( FT_Bool )
|
||||
FT_Get_Color_Glyph_Layer( FT_Face face,
|
||||
FT_UInt base_glyph,
|
||||
FT_UInt *aglyph_index,
|
||||
FT_UInt *acolor_index,
|
||||
FT_LayerIterator* iterator );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @section:
|
||||
@ -4267,6 +4234,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @since:
|
||||
* 2.3.8
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( FT_UShort )
|
||||
FT_Get_FSType_Flags( FT_Face face );
|
||||
@ -4360,6 +4328,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @since:
|
||||
* 2.3.6
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( FT_UInt )
|
||||
FT_Face_GetCharVariantIndex( FT_Face face,
|
||||
@ -4396,6 +4365,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @since:
|
||||
* 2.3.6
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( FT_Int )
|
||||
FT_Face_GetCharVariantIsDefault( FT_Face face,
|
||||
@ -4427,6 +4397,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @since:
|
||||
* 2.3.6
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( FT_UInt32* )
|
||||
FT_Face_GetVariantSelectors( FT_Face face );
|
||||
@ -4460,6 +4431,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @since:
|
||||
* 2.3.6
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( FT_UInt32* )
|
||||
FT_Face_GetVariantsOfChar( FT_Face face,
|
||||
@ -4494,6 +4466,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @since:
|
||||
* 2.3.6
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( FT_UInt32* )
|
||||
FT_Face_GetCharsOfVariant( FT_Face face,
|
||||
@ -4766,8 +4739,8 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
*/
|
||||
#define FREETYPE_MAJOR 2
|
||||
#define FREETYPE_MINOR 10
|
||||
#define FREETYPE_PATCH 4
|
||||
#define FREETYPE_MINOR 11
|
||||
#define FREETYPE_PATCH 1
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
@ -4829,6 +4802,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @since:
|
||||
* 2.3.5
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( FT_Bool )
|
||||
FT_Face_CheckTrueTypePatents( FT_Face face );
|
||||
@ -4857,6 +4831,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @since:
|
||||
* 2.3.5
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( FT_Bool )
|
||||
FT_Face_SetUnpatentedHinting( FT_Face face,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Quick computation of advance widths (specification only).
|
||||
*
|
||||
* Copyright (C) 2008-2020 by
|
||||
* Copyright (C) 2008-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType exact bbox computation (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
2
thirdparty/freetype/include/freetype/ftbdf.h
vendored
2
thirdparty/freetype/include/freetype/ftbdf.h
vendored
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType API for accessing BDF-specific strings (specification).
|
||||
*
|
||||
* Copyright (C) 2002-2020 by
|
||||
* Copyright (C) 2002-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType utility functions for bitmaps (specification).
|
||||
*
|
||||
* Copyright (C) 2004-2020 by
|
||||
* Copyright (C) 2004-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Bzip2-compressed stream support.
|
||||
*
|
||||
* Copyright (C) 2010-2020 by
|
||||
* Copyright (C) 2010-2021 by
|
||||
* Joel Klinghed.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType Cache subsystem (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -86,8 +86,8 @@ FT_BEGIN_HEADER
|
||||
* later use @FTC_CMapCache_Lookup to perform the equivalent of
|
||||
* @FT_Get_Char_Index, only much faster.
|
||||
*
|
||||
* If you want to use the @FT_Glyph caching, call @FTC_ImageCache, then
|
||||
* later use @FTC_ImageCache_Lookup to retrieve the corresponding
|
||||
* If you want to use the @FT_Glyph caching, call @FTC_ImageCache_New,
|
||||
* then later use @FTC_ImageCache_Lookup to retrieve the corresponding
|
||||
* @FT_Glyph objects from the cache.
|
||||
*
|
||||
* If you need lots of small bitmaps, it is much more memory efficient to
|
||||
|
@ -15,6 +15,7 @@
|
||||
* General Remarks
|
||||
*
|
||||
* @sections:
|
||||
* preamble
|
||||
* header_inclusion
|
||||
* user_allocation
|
||||
*
|
||||
@ -123,6 +124,7 @@
|
||||
* gzip
|
||||
* lzw
|
||||
* bzip2
|
||||
* debugging_apis
|
||||
*
|
||||
*/
|
||||
|
||||
|
2
thirdparty/freetype/include/freetype/ftcid.h
vendored
2
thirdparty/freetype/include/freetype/ftcid.h
vendored
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType API for accessing CID font information (specification).
|
||||
*
|
||||
* Copyright (C) 2007-2020 by
|
||||
* Copyright (C) 2007-2021 by
|
||||
* Dereg Clegg and Michael Toftdal.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
1407
thirdparty/freetype/include/freetype/ftcolor.h
vendored
1407
thirdparty/freetype/include/freetype/ftcolor.h
vendored
File diff suppressed because it is too large
Load Diff
74
thirdparty/freetype/include/freetype/ftdriver.h
vendored
74
thirdparty/freetype/include/freetype/ftdriver.h
vendored
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType API for controlling driver modules (specification only).
|
||||
*
|
||||
* Copyright (C) 2017-2020 by
|
||||
* Copyright (C) 2017-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -53,10 +53,10 @@ FT_BEGIN_HEADER
|
||||
* reasons.
|
||||
*
|
||||
* Available properties are @increase-x-height, @no-stem-darkening
|
||||
* (experimental), @darkening-parameters (experimental), @warping
|
||||
* (experimental), @glyph-to-script-map (experimental), @fallback-script
|
||||
* (experimental), and @default-script (experimental), as documented in
|
||||
* the @properties section.
|
||||
* (experimental), @darkening-parameters (experimental),
|
||||
* @glyph-to-script-map (experimental), @fallback-script (experimental),
|
||||
* and @default-script (experimental), as documented in the @properties
|
||||
* section.
|
||||
*
|
||||
*/
|
||||
|
||||
@ -84,15 +84,15 @@ FT_BEGIN_HEADER
|
||||
* @properties section.
|
||||
*
|
||||
*
|
||||
* **Hinting and antialiasing principles of the new engine**
|
||||
* **Hinting and anti-aliasing principles of the new engine**
|
||||
*
|
||||
* The rasterizer is positioning horizontal features (e.g., ascender
|
||||
* height & x-height, or crossbars) on the pixel grid and minimizing the
|
||||
* amount of antialiasing applied to them, while placing vertical
|
||||
* amount of anti-aliasing applied to them, while placing vertical
|
||||
* features (vertical stems) on the pixel grid without hinting, thus
|
||||
* representing the stem position and weight accurately. Sometimes the
|
||||
* vertical stems may be only partially black. In this context,
|
||||
* 'antialiasing' means that stems are not positioned exactly on pixel
|
||||
* 'anti-aliasing' means that stems are not positioned exactly on pixel
|
||||
* borders, causing a fuzzy appearance.
|
||||
*
|
||||
* There are two principles behind this approach.
|
||||
@ -108,7 +108,7 @@ FT_BEGIN_HEADER
|
||||
* sizes are comparable to kerning values and thus would be noticeable
|
||||
* (and distracting) while reading if hinting were applied.
|
||||
*
|
||||
* One of the reasons to not hint horizontally is antialiasing for LCD
|
||||
* One of the reasons to not hint horizontally is anti-aliasing for LCD
|
||||
* screens: The pixel geometry of modern displays supplies three vertical
|
||||
* subpixels as the eye moves horizontally across each visible pixel. On
|
||||
* devices where we can be certain this characteristic is present a
|
||||
@ -116,7 +116,7 @@ FT_BEGIN_HEADER
|
||||
* weight. In Western writing systems this turns out to be the more
|
||||
* critical direction anyway; the weights and spacing of vertical stems
|
||||
* (see above) are central to Armenian, Cyrillic, Greek, and Latin type
|
||||
* designs. Even when the rasterizer uses greyscale antialiasing instead
|
||||
* designs. Even when the rasterizer uses greyscale anti-aliasing instead
|
||||
* of color (a necessary compromise when one doesn't know the screen
|
||||
* characteristics), the unhinted vertical features preserve the design's
|
||||
* weight and spacing much better than aliased type would.
|
||||
@ -362,12 +362,8 @@ FT_BEGIN_HEADER
|
||||
* The same holds for the Type~1 and CID modules if compiled with
|
||||
* `T1_CONFIG_OPTION_OLD_ENGINE`.
|
||||
*
|
||||
* For the 'cff' module, the default engine is 'freetype' if
|
||||
* `CFF_CONFIG_OPTION_OLD_ENGINE` is defined, and 'adobe' otherwise.
|
||||
*
|
||||
* For both the 'type1' and 't1cid' modules, the default engine is
|
||||
* 'freetype' if `T1_CONFIG_OPTION_OLD_ENGINE` is defined, and 'adobe'
|
||||
* otherwise.
|
||||
* For the 'cff' module, the default engine is 'adobe'. For both the
|
||||
* 'type1' and 't1cid' modules, the default engine is 'adobe', too.
|
||||
*
|
||||
* @note:
|
||||
* This property can be used with @FT_Property_Get also.
|
||||
@ -1166,48 +1162,18 @@ FT_BEGIN_HEADER
|
||||
* warping
|
||||
*
|
||||
* @description:
|
||||
* **Experimental only**
|
||||
* **Obsolete**
|
||||
*
|
||||
* If FreeType gets compiled with option `AF_CONFIG_OPTION_USE_WARPER` to
|
||||
* activate the warp hinting code in the auto-hinter, this property
|
||||
* switches warping on and off.
|
||||
* This property was always experimental and probably never worked
|
||||
* correctly. It was entirely removed from the FreeType~2 sources. This
|
||||
* entry is only here for historical reference.
|
||||
*
|
||||
* Warping only works in 'normal' auto-hinting mode replacing it. The
|
||||
* idea of the code is to slightly scale and shift a glyph along the
|
||||
* Warping only worked in 'normal' auto-hinting mode replacing it. The
|
||||
* idea of the code was to slightly scale and shift a glyph along the
|
||||
* non-hinted dimension (which is usually the horizontal axis) so that as
|
||||
* much of its segments are aligned (more or less) to the grid. To find
|
||||
* much of its segments were aligned (more or less) to the grid. To find
|
||||
* out a glyph's optimal scaling and shifting value, various parameter
|
||||
* combinations are tried and scored.
|
||||
*
|
||||
* By default, warping is off.
|
||||
*
|
||||
* @note:
|
||||
* This property can be used with @FT_Property_Get also.
|
||||
*
|
||||
* This property can be set via the `FREETYPE_PROPERTIES` environment
|
||||
* variable (using values 1 and 0 for 'on' and 'off', respectively).
|
||||
*
|
||||
* The warping code can also change advance widths. Have a look at the
|
||||
* `lsb_delta` and `rsb_delta` fields in the @FT_GlyphSlotRec structure
|
||||
* for details on improving inter-glyph distances while rendering.
|
||||
*
|
||||
* Since warping is a global property of the auto-hinter it is best to
|
||||
* change its value before rendering any face. Otherwise, you should
|
||||
* reload all faces that get auto-hinted in 'normal' hinting mode.
|
||||
*
|
||||
* @example:
|
||||
* This example shows how to switch on warping (omitting the error
|
||||
* handling).
|
||||
*
|
||||
* ```
|
||||
* FT_Library library;
|
||||
* FT_Bool warping = 1;
|
||||
*
|
||||
*
|
||||
* FT_Init_FreeType( &library );
|
||||
*
|
||||
* FT_Property_Set( library, "autofitter", "warping", &warping );
|
||||
* ```
|
||||
* combinations were tried and scored.
|
||||
*
|
||||
* @since:
|
||||
* 2.6
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType error codes (specification).
|
||||
*
|
||||
* Copyright (C) 2002-2020 by
|
||||
* Copyright (C) 2002-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType error code handling (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -281,6 +281,8 @@ FT_BEGIN_HEADER
|
||||
FT_EXPORT( const char* )
|
||||
FT_Error_String( FT_Error error_code );
|
||||
|
||||
/* */
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Support functions for font formats.
|
||||
*
|
||||
* Copyright (C) 2002-2020 by
|
||||
* Copyright (C) 2002-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Access of TrueType's 'gasp' table (specification).
|
||||
*
|
||||
* Copyright (C) 2007-2020 by
|
||||
* Copyright (C) 2007-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
16
thirdparty/freetype/include/freetype/ftglyph.h
vendored
16
thirdparty/freetype/include/freetype/ftglyph.h
vendored
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType convenience functions to handle glyphs (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -337,9 +337,9 @@ FT_BEGIN_HEADER
|
||||
* vector.
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Glyph_Transform( FT_Glyph glyph,
|
||||
FT_Matrix* matrix,
|
||||
FT_Vector* delta );
|
||||
FT_Glyph_Transform( FT_Glyph glyph,
|
||||
const FT_Matrix* matrix,
|
||||
const FT_Vector* delta );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
@ -569,10 +569,10 @@ FT_BEGIN_HEADER
|
||||
* ```
|
||||
*/
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Glyph_To_Bitmap( FT_Glyph* the_glyph,
|
||||
FT_Render_Mode render_mode,
|
||||
FT_Vector* origin,
|
||||
FT_Bool destroy );
|
||||
FT_Glyph_To_Bitmap( FT_Glyph* the_glyph,
|
||||
FT_Render_Mode render_mode,
|
||||
const FT_Vector* origin,
|
||||
FT_Bool destroy );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType API for validating TrueTypeGX/AAT tables (specification).
|
||||
*
|
||||
* Copyright (C) 2004-2020 by
|
||||
* Copyright (C) 2004-2021 by
|
||||
* Masatake YAMATO, Redhat K.K,
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Gzip-compressed stream support.
|
||||
*
|
||||
* Copyright (C) 2002-2020 by
|
||||
* Copyright (C) 2002-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
114
thirdparty/freetype/include/freetype/ftimage.h
vendored
114
thirdparty/freetype/include/freetype/ftimage.h
vendored
@ -5,7 +5,7 @@
|
||||
* FreeType glyph image formats and default raster interface
|
||||
* (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -28,11 +28,6 @@
|
||||
#define FTIMAGE_H_
|
||||
|
||||
|
||||
/* STANDALONE_ is from ftgrays.c */
|
||||
#ifndef STANDALONE_
|
||||
#endif
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
||||
@ -201,6 +196,11 @@ FT_BEGIN_HEADER
|
||||
#define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2
|
||||
#define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4
|
||||
|
||||
/* */
|
||||
|
||||
/* For debugging, the @FT_Pixel_Mode enumeration must stay in sync */
|
||||
/* with the `pixel_modes` array in file `ftobjs.c`. */
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
@ -695,11 +695,13 @@ FT_BEGIN_HEADER
|
||||
* to get a simple enumeration without assigning special numbers.
|
||||
*/
|
||||
#ifndef FT_IMAGE_TAG
|
||||
#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) \
|
||||
value = ( ( (unsigned long)_x1 << 24 ) | \
|
||||
( (unsigned long)_x2 << 16 ) | \
|
||||
( (unsigned long)_x3 << 8 ) | \
|
||||
(unsigned long)_x4 )
|
||||
|
||||
#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) \
|
||||
value = ( ( FT_STATIC_BYTE_CAST( unsigned long, _x1 ) << 24 ) | \
|
||||
( FT_STATIC_BYTE_CAST( unsigned long, _x2 ) << 16 ) | \
|
||||
( FT_STATIC_BYTE_CAST( unsigned long, _x3 ) << 8 ) | \
|
||||
FT_STATIC_BYTE_CAST( unsigned long, _x4 ) )
|
||||
|
||||
#endif /* FT_IMAGE_TAG */
|
||||
|
||||
|
||||
@ -772,17 +774,6 @@ FT_BEGIN_HEADER
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* A raster is a scan converter, in charge of rendering an outline into a
|
||||
* bitmap. This section contains the public API for rasters.
|
||||
*
|
||||
* Note that in FreeType 2, all rasters are now encapsulated within
|
||||
* specific modules called 'renderers'. See `ftrender.h` for more details
|
||||
* on renderers.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
@ -796,16 +787,35 @@ FT_BEGIN_HEADER
|
||||
* How vectorial outlines are converted into bitmaps and pixmaps.
|
||||
*
|
||||
* @description:
|
||||
* This section contains technical definitions.
|
||||
* A raster or a rasterizer is a scan converter in charge of producing a
|
||||
* pixel coverage bitmap that can be used as an alpha channel when
|
||||
* compositing a glyph with a background. FreeType comes with two
|
||||
* rasterizers: bilevel `raster1` and anti-aliased `smooth` are two
|
||||
* separate modules. They are usually called from the high-level
|
||||
* @FT_Load_Glyph or @FT_Render_Glyph functions and produce the entire
|
||||
* coverage bitmap at once, while staying largely invisible to users.
|
||||
*
|
||||
* Instead of working with complete coverage bitmaps, it is also possible
|
||||
* to intercept consecutive pixel runs on the same scanline with the same
|
||||
* coverage, called _spans_, and process them individually. Only the
|
||||
* `smooth` rasterizer permits this when calling @FT_Outline_Render with
|
||||
* @FT_Raster_Params as described below.
|
||||
*
|
||||
* Working with either complete bitmaps or spans it is important to think
|
||||
* of them as colorless coverage objects suitable as alpha channels to
|
||||
* blend arbitrary colors with a background. For best results, it is
|
||||
* recommended to use gamma correction, too.
|
||||
*
|
||||
* This section also describes the public API needed to set up alternative
|
||||
* @FT_Renderer modules.
|
||||
*
|
||||
* @order:
|
||||
* FT_Raster
|
||||
* FT_Span
|
||||
* FT_SpanFunc
|
||||
*
|
||||
* FT_Raster_Params
|
||||
* FT_RASTER_FLAG_XXX
|
||||
*
|
||||
* FT_Raster
|
||||
* FT_Raster_NewFunc
|
||||
* FT_Raster_DoneFunc
|
||||
* FT_Raster_ResetFunc
|
||||
@ -816,26 +826,14 @@ FT_BEGIN_HEADER
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @type:
|
||||
* FT_Raster
|
||||
*
|
||||
* @description:
|
||||
* An opaque handle (pointer) to a raster object. Each object can be
|
||||
* used independently to convert an outline into a bitmap or pixmap.
|
||||
*/
|
||||
typedef struct FT_RasterRec_* FT_Raster;
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @struct:
|
||||
* FT_Span
|
||||
*
|
||||
* @description:
|
||||
* A structure used to model a single span of gray pixels when rendering
|
||||
* an anti-aliased bitmap.
|
||||
* A structure to model a single span of consecutive pixels when
|
||||
* rendering an anti-aliased bitmap.
|
||||
*
|
||||
* @fields:
|
||||
* x ::
|
||||
@ -852,8 +850,8 @@ FT_BEGIN_HEADER
|
||||
* This structure is used by the span drawing callback type named
|
||||
* @FT_SpanFunc that takes the y~coordinate of the span as a parameter.
|
||||
*
|
||||
* The coverage value is always between 0 and 255. If you want less gray
|
||||
* values, the callback function has to reduce them.
|
||||
* The anti-aliased rasterizer produces coverage values from 0 to 255,
|
||||
* this is, from completely transparent to completely opaque.
|
||||
*/
|
||||
typedef struct FT_Span_
|
||||
{
|
||||
@ -871,8 +869,8 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @description:
|
||||
* A function used as a call-back by the anti-aliased renderer in order
|
||||
* to let client applications draw themselves the gray pixel spans on
|
||||
* each scan line.
|
||||
* to let client applications draw themselves the pixel spans on each
|
||||
* scan line.
|
||||
*
|
||||
* @input:
|
||||
* y ::
|
||||
@ -888,11 +886,12 @@ FT_BEGIN_HEADER
|
||||
* User-supplied data that is passed to the callback.
|
||||
*
|
||||
* @note:
|
||||
* This callback allows client applications to directly render the gray
|
||||
* spans of the anti-aliased bitmap to any kind of surfaces.
|
||||
* This callback allows client applications to directly render the spans
|
||||
* of the anti-aliased bitmap to any kind of surfaces.
|
||||
*
|
||||
* This can be used to write anti-aliased outlines directly to a given
|
||||
* background bitmap, and even perform translucency.
|
||||
* background bitmap using alpha compositing. It can also be used for
|
||||
* oversampling and averaging.
|
||||
*/
|
||||
typedef void
|
||||
(*FT_SpanFunc)( int y,
|
||||
@ -962,11 +961,17 @@ FT_BEGIN_HEADER
|
||||
* will be clipped to a box specified in the `clip_box` field of the
|
||||
* @FT_Raster_Params structure. Otherwise, the `clip_box` is
|
||||
* effectively set to the bounding box and all spans are generated.
|
||||
*
|
||||
* FT_RASTER_FLAG_SDF ::
|
||||
* This flag is set to indicate that a signed distance field glyph
|
||||
* image should be generated. This is only used while rendering with
|
||||
* the @FT_RENDER_MODE_SDF render mode.
|
||||
*/
|
||||
#define FT_RASTER_FLAG_DEFAULT 0x0
|
||||
#define FT_RASTER_FLAG_AA 0x1
|
||||
#define FT_RASTER_FLAG_DIRECT 0x2
|
||||
#define FT_RASTER_FLAG_CLIP 0x4
|
||||
#define FT_RASTER_FLAG_SDF 0x8
|
||||
|
||||
/* these constants are deprecated; use the corresponding */
|
||||
/* `FT_RASTER_FLAG_XXX` values instead */
|
||||
@ -1047,6 +1052,23 @@ FT_BEGIN_HEADER
|
||||
} FT_Raster_Params;
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @type:
|
||||
* FT_Raster
|
||||
*
|
||||
* @description:
|
||||
* An opaque handle (pointer) to a raster object. Each object can be
|
||||
* used independently to convert an outline into a bitmap or pixmap.
|
||||
*
|
||||
* @note:
|
||||
* In FreeType 2, all rasters are now encapsulated within specific
|
||||
* @FT_Renderer modules and only used in their context.
|
||||
*
|
||||
*/
|
||||
typedef struct FT_RasterRec_* FT_Raster;
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @functype:
|
||||
|
17
thirdparty/freetype/include/freetype/ftincrem.h
vendored
17
thirdparty/freetype/include/freetype/ftincrem.h
vendored
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType incremental loading (specification).
|
||||
*
|
||||
* Copyright (C) 2002-2020 by
|
||||
* Copyright (C) 2002-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -213,9 +213,14 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @description:
|
||||
* A function used to retrieve the basic metrics of a given glyph index
|
||||
* before accessing its data. This is necessary because, in certain
|
||||
* formats like TrueType, the metrics are stored in a different place
|
||||
* from the glyph images proper.
|
||||
* before accessing its data. This allows for handling font types such
|
||||
* as PCL~XL Format~1, Class~2 downloaded TrueType fonts, where the glyph
|
||||
* metrics (`hmtx` and `vmtx` tables) are permitted to be omitted from
|
||||
* the font, and the relevant metrics included in the header of the glyph
|
||||
* outline data. Importantly, this is not intended to allow custom glyph
|
||||
* metrics (for example, Postscript Metrics dictionaries), because that
|
||||
* conflicts with the requirements of outline hinting. Such custom
|
||||
* metrics must be handled separately, by the calling application.
|
||||
*
|
||||
* @input:
|
||||
* incremental ::
|
||||
@ -235,7 +240,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @output:
|
||||
* ametrics ::
|
||||
* The replacement glyph metrics in font units.
|
||||
* The glyph metrics in font units.
|
||||
*
|
||||
*/
|
||||
typedef FT_Error
|
||||
@ -264,7 +269,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* get_glyph_metrics ::
|
||||
* The function to get glyph metrics. May be null if the font does not
|
||||
* provide overriding glyph metrics.
|
||||
* require it.
|
||||
*
|
||||
*/
|
||||
typedef struct FT_Incremental_FuncsRec_
|
||||
|
21
thirdparty/freetype/include/freetype/ftlcdfil.h
vendored
21
thirdparty/freetype/include/freetype/ftlcdfil.h
vendored
@ -5,7 +5,7 @@
|
||||
* FreeType API for color filtering of subpixel bitmap glyphs
|
||||
* (specification).
|
||||
*
|
||||
* Copyright (C) 2006-2020 by
|
||||
* Copyright (C) 2006-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -44,7 +44,7 @@ FT_BEGIN_HEADER
|
||||
* API to control subpixel rendering.
|
||||
*
|
||||
* @description:
|
||||
* FreeType provides two alternative subpixel rendering technologies.
|
||||
* FreeType provides two alternative subpixel rendering technologies.
|
||||
* Should you define `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` in your
|
||||
* `ftoption.h` file, this enables ClearType-style rendering.
|
||||
* Otherwise, Harmony LCD rendering is enabled. These technologies are
|
||||
@ -55,13 +55,12 @@ FT_BEGIN_HEADER
|
||||
* ClearType-style LCD rendering exploits the color-striped structure of
|
||||
* LCD pixels, increasing the available resolution in the direction of
|
||||
* the stripe (usually horizontal RGB) by a factor of~3. Using the
|
||||
* subpixels coverages unfiltered can create severe color fringes
|
||||
* subpixel coverages unfiltered can create severe color fringes
|
||||
* especially when rendering thin features. Indeed, to produce
|
||||
* black-on-white text, the nearby color subpixels must be dimmed
|
||||
* equally.
|
||||
*
|
||||
* A good 5-tap FIR filter should be applied to subpixel coverages
|
||||
* regardless of pixel boundaries and should have these properties:
|
||||
* evenly. Therefore, an equalizing 5-tap FIR filter should be applied
|
||||
* to subpixel coverages regardless of pixel boundaries and should have
|
||||
* these properties:
|
||||
*
|
||||
* 1. It should be symmetrical, like {~a, b, c, b, a~}, to avoid
|
||||
* any shifts in appearance.
|
||||
@ -84,7 +83,7 @@ FT_BEGIN_HEADER
|
||||
* Harmony LCD rendering is suitable to panels with any regular subpixel
|
||||
* structure, not just monitors with 3 color striped subpixels, as long
|
||||
* as the color subpixels have fixed positions relative to the pixel
|
||||
* center. In this case, each color channel is then rendered separately
|
||||
* center. In this case, each color channel can be rendered separately
|
||||
* after shifting the outline opposite to the subpixel shift so that the
|
||||
* coverage maps are aligned. This method is immune to color fringes
|
||||
* because the shifts do not change integral coverage.
|
||||
@ -101,9 +100,9 @@ FT_BEGIN_HEADER
|
||||
* clockwise. Harmony with default LCD geometry is equivalent to
|
||||
* ClearType with light filter.
|
||||
*
|
||||
* As a result of ClearType filtering or Harmony rendering, the
|
||||
* dimensions of LCD bitmaps can be either wider or taller than the
|
||||
* dimensions of the corresponding outline with regard to the pixel grid.
|
||||
* As a result of ClearType filtering or Harmony shifts, the resulting
|
||||
* dimensions of LCD bitmaps can be slightly wider or taller than the
|
||||
* dimensions the original outline with regard to the pixel grid.
|
||||
* For example, for @FT_RENDER_MODE_LCD, the filter adds 2~subpixels to
|
||||
* the left, and 2~subpixels to the right. The bitmap offset values are
|
||||
* adjusted accordingly, so clients shouldn't need to modify their layout
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Generic list support for FreeType (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
184
thirdparty/freetype/include/freetype/ftlogging.h
vendored
Normal file
184
thirdparty/freetype/include/freetype/ftlogging.h
vendored
Normal file
@ -0,0 +1,184 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* ftlogging.h
|
||||
*
|
||||
* Additional debugging APIs.
|
||||
*
|
||||
* Copyright (C) 2020-2021 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef FTLOGGING_H_
|
||||
#define FTLOGGING_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_CONFIG_CONFIG_H
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @section:
|
||||
* debugging_apis
|
||||
*
|
||||
* @title:
|
||||
* External Debugging APIs
|
||||
*
|
||||
* @abstract:
|
||||
* Public APIs to control the `FT_DEBUG_LOGGING` macro.
|
||||
*
|
||||
* @description:
|
||||
* This section contains the declarations of public functions that
|
||||
* enables fine control of what the `FT_DEBUG_LOGGING` macro outputs.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @function:
|
||||
* FT_Trace_Set_Level
|
||||
*
|
||||
* @description:
|
||||
* Change the levels of tracing components of FreeType at run time.
|
||||
*
|
||||
* @input:
|
||||
* tracing_level ::
|
||||
* New tracing value.
|
||||
*
|
||||
* @example:
|
||||
* The following call makes FreeType trace everything but the 'memory'
|
||||
* component.
|
||||
*
|
||||
* ```
|
||||
* FT_Trace_Set_Level( "any:7 memory:0 );
|
||||
* ```
|
||||
*
|
||||
* @note:
|
||||
* This function does nothing if compilation option `FT_DEBUG_LOGGING`
|
||||
* isn't set.
|
||||
*
|
||||
* @since:
|
||||
* 2.11
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( void )
|
||||
FT_Trace_Set_Level( const char* tracing_level );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @function:
|
||||
* FT_Trace_Set_Default_Level
|
||||
*
|
||||
* @description:
|
||||
* Reset tracing value of FreeType's components to the default value
|
||||
* (i.e., to the value of the `FT2_DEBUG` environment value or to NULL
|
||||
* if `FT2_DEBUG` is not set).
|
||||
*
|
||||
* @note:
|
||||
* This function does nothing if compilation option `FT_DEBUG_LOGGING`
|
||||
* isn't set.
|
||||
*
|
||||
* @since:
|
||||
* 2.11
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( void )
|
||||
FT_Trace_Set_Default_Level( void );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @functype:
|
||||
* FT_Custom_Log_Handler
|
||||
*
|
||||
* @description:
|
||||
* A function typedef that is used to handle the logging of tracing and
|
||||
* debug messages on a file system.
|
||||
*
|
||||
* @input:
|
||||
* ft_component ::
|
||||
* The name of `FT_COMPONENT` from which the current debug or error
|
||||
* message is produced.
|
||||
*
|
||||
* fmt ::
|
||||
* Actual debug or tracing message.
|
||||
*
|
||||
* args::
|
||||
* Arguments of debug or tracing messages.
|
||||
*
|
||||
* @since:
|
||||
* 2.11
|
||||
*
|
||||
*/
|
||||
typedef void
|
||||
(*FT_Custom_Log_Handler)( const char* ft_component,
|
||||
const char* fmt,
|
||||
va_list args );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @function:
|
||||
* FT_Set_Log_Handler
|
||||
*
|
||||
* @description:
|
||||
* A function to set a custom log handler.
|
||||
*
|
||||
* @input:
|
||||
* handler ::
|
||||
* New logging function.
|
||||
*
|
||||
* @note:
|
||||
* This function does nothing if compilation option `FT_DEBUG_LOGGING`
|
||||
* isn't set.
|
||||
*
|
||||
* @since:
|
||||
* 2.11
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( void )
|
||||
FT_Set_Log_Handler( FT_Custom_Log_Handler handler );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @function:
|
||||
* FT_Set_Default_Log_Handler
|
||||
*
|
||||
* @description:
|
||||
* A function to undo the effect of @FT_Set_Log_Handler, resetting the
|
||||
* log handler to FreeType's built-in version.
|
||||
*
|
||||
* @note:
|
||||
* This function does nothing if compilation option `FT_DEBUG_LOGGING`
|
||||
* isn't set.
|
||||
*
|
||||
* @since:
|
||||
* 2.11
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( void )
|
||||
FT_Set_Default_Log_Handler( void );
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* FTLOGGING_H_ */
|
||||
|
||||
|
||||
/* END */
|
2
thirdparty/freetype/include/freetype/ftlzw.h
vendored
2
thirdparty/freetype/include/freetype/ftlzw.h
vendored
@ -4,7 +4,7 @@
|
||||
*
|
||||
* LZW-compressed stream support.
|
||||
*
|
||||
* Copyright (C) 2004-2020 by
|
||||
* Copyright (C) 2004-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
2
thirdparty/freetype/include/freetype/ftmac.h
vendored
2
thirdparty/freetype/include/freetype/ftmac.h
vendored
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Additional Mac-specific API.
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
2
thirdparty/freetype/include/freetype/ftmm.h
vendored
2
thirdparty/freetype/include/freetype/ftmm.h
vendored
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType Multiple Master font interface (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
35
thirdparty/freetype/include/freetype/ftmodapi.h
vendored
35
thirdparty/freetype/include/freetype/ftmodapi.h
vendored
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType modules public interface (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -45,10 +45,12 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @description:
|
||||
* The definitions below are used to manage modules within FreeType.
|
||||
* Modules can be added, upgraded, and removed at runtime. Additionally,
|
||||
* some module properties can be controlled also.
|
||||
* Internal and external modules can be added, upgraded, and removed at
|
||||
* runtime. For example, an alternative renderer or proprietary font
|
||||
* driver can be registered and prioritized. Additionally, some module
|
||||
* properties can also be controlled.
|
||||
*
|
||||
* Here is a list of possible values of the `module_name` field in the
|
||||
* Here is a list of existing values of the `module_name` field in the
|
||||
* @FT_Module_Class structure.
|
||||
*
|
||||
* ```
|
||||
@ -86,6 +88,7 @@ FT_BEGIN_HEADER
|
||||
* FT_Remove_Module
|
||||
* FT_Add_Default_Modules
|
||||
*
|
||||
* FT_FACE_DRIVER_NAME
|
||||
* FT_Property_Set
|
||||
* FT_Property_Get
|
||||
* FT_Set_Default_Properties
|
||||
@ -328,6 +331,27 @@ FT_BEGIN_HEADER
|
||||
FT_Module module );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @macro:
|
||||
* FT_FACE_DRIVER_NAME
|
||||
*
|
||||
* @description:
|
||||
* A macro that retrieves the name of a font driver from a face object.
|
||||
*
|
||||
* @note:
|
||||
* The font driver name is a valid `module_name` for @FT_Property_Set
|
||||
* and @FT_Property_Get. This is not the same as @FT_Get_Font_Format.
|
||||
*
|
||||
* @since:
|
||||
* 2.11
|
||||
*
|
||||
*/
|
||||
#define FT_FACE_DRIVER_NAME( face ) \
|
||||
( ( *FT_REINTERPRET_CAST( FT_Module_Class**, \
|
||||
( face )->driver ) )->module_name )
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @function:
|
||||
@ -485,8 +509,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* ```
|
||||
* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
|
||||
* cff:no-stem-darkening=0 \
|
||||
* autofitter:warping=1
|
||||
* cff:no-stem-darkening=0
|
||||
* ```
|
||||
*
|
||||
* @inout:
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType module error offsets (specification).
|
||||
*
|
||||
* Copyright (C) 2001-2020 by
|
||||
* Copyright (C) 2001-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -171,6 +171,7 @@
|
||||
FT_MODERRDEF( Type42, 0x1400, "Type 42 module" )
|
||||
FT_MODERRDEF( Winfonts, 0x1500, "Windows FON/FNT module" )
|
||||
FT_MODERRDEF( GXvalid, 0x1600, "GX validation module" )
|
||||
FT_MODERRDEF( Sdf, 0x1700, "Signed distance field raster module" )
|
||||
|
||||
|
||||
#ifdef FT_MODERR_END_LIST
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType API for validating OpenType tables (specification).
|
||||
*
|
||||
* Copyright (C) 2004-2020 by
|
||||
* Copyright (C) 2004-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Support for the FT_Outline type used to store glyph shapes of
|
||||
* most scalable font formats (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType API for possible FT_Parameter tags (specification only).
|
||||
*
|
||||
* Copyright (C) 2017-2020 by
|
||||
* Copyright (C) 2017-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
2
thirdparty/freetype/include/freetype/ftpfr.h
vendored
2
thirdparty/freetype/include/freetype/ftpfr.h
vendored
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType API for accessing PFR-specific data (specification only).
|
||||
*
|
||||
* Copyright (C) 2002-2020 by
|
||||
* Copyright (C) 2002-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType renderer modules public interface (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType size objects management (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
* This is _not_ used to retrieve glyph names!
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType path stroker (specification).
|
||||
*
|
||||
* Copyright (C) 2002-2020 by
|
||||
* Copyright (C) 2002-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -5,7 +5,7 @@
|
||||
* FreeType synthesizing code for emboldening and slanting
|
||||
* (specification).
|
||||
*
|
||||
* Copyright (C) 2000-2020 by
|
||||
* Copyright (C) 2000-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType low-level system interface definition (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType trigonometric functions (specification).
|
||||
*
|
||||
* Copyright (C) 2001-2020 by
|
||||
* Copyright (C) 2001-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
19
thirdparty/freetype/include/freetype/fttypes.h
vendored
19
thirdparty/freetype/include/freetype/fttypes.h
vendored
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType simple types definitions (specification only).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -413,7 +413,7 @@ FT_BEGIN_HEADER
|
||||
typedef struct FT_Data_
|
||||
{
|
||||
const FT_Byte* pointer;
|
||||
FT_Int length;
|
||||
FT_UInt length;
|
||||
|
||||
} FT_Data;
|
||||
|
||||
@ -479,18 +479,17 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @description:
|
||||
* This macro converts four-letter tags that are used to label TrueType
|
||||
* tables into an unsigned long, to be used within FreeType.
|
||||
* tables into an `FT_Tag` type, to be used within FreeType.
|
||||
*
|
||||
* @note:
|
||||
* The produced values **must** be 32-bit integers. Don't redefine this
|
||||
* macro.
|
||||
*/
|
||||
#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
|
||||
(FT_Tag) \
|
||||
( ( (FT_ULong)_x1 << 24 ) | \
|
||||
( (FT_ULong)_x2 << 16 ) | \
|
||||
( (FT_ULong)_x3 << 8 ) | \
|
||||
(FT_ULong)_x4 )
|
||||
#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
|
||||
( ( FT_STATIC_BYTE_CAST( FT_Tag, _x1 ) << 24 ) | \
|
||||
( FT_STATIC_BYTE_CAST( FT_Tag, _x2 ) << 16 ) | \
|
||||
( FT_STATIC_BYTE_CAST( FT_Tag, _x3 ) << 8 ) | \
|
||||
FT_STATIC_BYTE_CAST( FT_Tag, _x4 ) )
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -588,7 +587,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
|
||||
#define FT_IS_EMPTY( list ) ( (list).head == 0 )
|
||||
#define FT_BOOL( x ) ( (FT_Bool)( (x) != 0 ) )
|
||||
#define FT_BOOL( x ) FT_STATIC_CAST( FT_Bool, (x) != 0 )
|
||||
|
||||
/* concatenate C tokens */
|
||||
#define FT_ERR_XCAT( x, y ) x ## y
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType API for accessing Windows fnt-specific data.
|
||||
*
|
||||
* Copyright (C) 2003-2020 by
|
||||
* Copyright (C) 2003-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -55,7 +55,7 @@ FT_BEGIN_HEADER
|
||||
* FT_WinFNT_ID_XXX
|
||||
*
|
||||
* @description:
|
||||
* A list of valid values for the `charset` byte in @FT_WinFNT_HeaderRec.
|
||||
* A list of valid values for the `charset` byte in @FT_WinFNT_HeaderRec.
|
||||
* Exact mapping tables for the various 'cpXXXX' encodings (except for
|
||||
* 'cp1361') can be found at 'ftp://ftp.unicode.org/Public/' in the
|
||||
* `MAPPINGS/VENDORS/MICSFT/WINDOWS` subdirectory. 'cp1361' is roughly a
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* High-level 'autohint' module-specific interface (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Basic OpenType/CFF object type definitions (specification).
|
||||
*
|
||||
* Copyright (C) 2017-2020 by
|
||||
* Copyright (C) 2017-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Basic OpenType/CFF type definitions and interface (specification
|
||||
* only).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Compiler-specific macro definitions used internally by FreeType.
|
||||
*
|
||||
* Copyright (C) 2020 by
|
||||
* Copyright (C) 2020-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -71,12 +71,18 @@ FT_BEGIN_HEADER
|
||||
*/
|
||||
#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
|
||||
|
||||
#ifdef _WIN64
|
||||
#ifdef __UINTPTR_TYPE__
|
||||
/*
|
||||
* GCC and Clang both provide a `__UINTPTR_TYPE__` that can be used to
|
||||
* avoid a dependency on `stdint.h`.
|
||||
*/
|
||||
# define FT_UINT_TO_POINTER( x ) (void *)(__UINTPTR_TYPE__)(x)
|
||||
#elif defined( _WIN64 )
|
||||
/* only 64bit Windows uses the LLP64 data model, i.e., */
|
||||
/* 32-bit integers, 64-bit pointers. */
|
||||
#define FT_UINT_TO_POINTER( x ) (void *)(unsigned __int64)(x)
|
||||
# define FT_UINT_TO_POINTER( x ) (void *)(unsigned __int64)(x)
|
||||
#else
|
||||
#define FT_UINT_TO_POINTER( x ) (void *)(unsigned long)(x)
|
||||
# define FT_UINT_TO_POINTER( x ) (void *)(unsigned long)(x)
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -216,79 +222,91 @@ FT_BEGIN_HEADER
|
||||
#define FT_EXPORT_VAR( x ) FT_FUNCTION_DECLARATION( x )
|
||||
#endif
|
||||
|
||||
/* When compiling FreeType as a DLL or DSO with hidden visibility, */
|
||||
/* some systems/compilers need a special attribute in front OR after */
|
||||
/* the return type of function declarations. */
|
||||
/* */
|
||||
/* Two macros are used within the FreeType source code to define */
|
||||
/* exported library functions: `FT_EXPORT` and `FT_EXPORT_DEF`. */
|
||||
/* */
|
||||
/* - `FT_EXPORT( return_type )` */
|
||||
/* */
|
||||
/* is used in a function declaration, as in */
|
||||
/* */
|
||||
/* ``` */
|
||||
/* FT_EXPORT( FT_Error ) */
|
||||
/* FT_Init_FreeType( FT_Library* alibrary ); */
|
||||
/* ``` */
|
||||
/* */
|
||||
/* - `FT_EXPORT_DEF( return_type )` */
|
||||
/* */
|
||||
/* is used in a function definition, as in */
|
||||
/* */
|
||||
/* ``` */
|
||||
/* FT_EXPORT_DEF( FT_Error ) */
|
||||
/* FT_Init_FreeType( FT_Library* alibrary ) */
|
||||
/* { */
|
||||
/* ... some code ... */
|
||||
/* return FT_Err_Ok; */
|
||||
/* } */
|
||||
/* ``` */
|
||||
/* */
|
||||
/* You can provide your own implementation of `FT_EXPORT` and */
|
||||
/* `FT_EXPORT_DEF` here if you want. */
|
||||
/* */
|
||||
/* To export a variable, use `FT_EXPORT_VAR`. */
|
||||
/* */
|
||||
/*
|
||||
* When compiling FreeType as a DLL or DSO with hidden visibility,
|
||||
* some systems/compilers need a special attribute in front OR after
|
||||
* the return type of function declarations.
|
||||
*
|
||||
* Two macros are used within the FreeType source code to define
|
||||
* exported library functions: `FT_EXPORT` and `FT_EXPORT_DEF`.
|
||||
*
|
||||
* - `FT_EXPORT( return_type )`
|
||||
*
|
||||
* is used in a function declaration, as in
|
||||
*
|
||||
* ```
|
||||
* FT_EXPORT( FT_Error )
|
||||
* FT_Init_FreeType( FT_Library* alibrary );
|
||||
* ```
|
||||
*
|
||||
* - `FT_EXPORT_DEF( return_type )`
|
||||
*
|
||||
* is used in a function definition, as in
|
||||
*
|
||||
* ```
|
||||
* FT_EXPORT_DEF( FT_Error )
|
||||
* FT_Init_FreeType( FT_Library* alibrary )
|
||||
* {
|
||||
* ... some code ...
|
||||
* return FT_Err_Ok;
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* You can provide your own implementation of `FT_EXPORT` and
|
||||
* `FT_EXPORT_DEF` here if you want.
|
||||
*
|
||||
* To export a variable, use `FT_EXPORT_VAR`.
|
||||
*/
|
||||
|
||||
/* See `freetype/config/compiler_macros.h` for the `FT_EXPORT` definition */
|
||||
#define FT_EXPORT_DEF( x ) FT_FUNCTION_DEFINITION( x )
|
||||
|
||||
/* The following macros are needed to compile the library with a */
|
||||
/* C++ compiler and with 16bit compilers. */
|
||||
/* */
|
||||
/*
|
||||
* The following macros are needed to compile the library with a
|
||||
* C++ compiler and with 16bit compilers.
|
||||
*/
|
||||
|
||||
/* This is special. Within C++, you must specify `extern "C"` for */
|
||||
/* functions which are used via function pointers, and you also */
|
||||
/* must do that for structures which contain function pointers to */
|
||||
/* assure C linkage -- it's not possible to have (local) anonymous */
|
||||
/* functions which are accessed by (global) function pointers. */
|
||||
/* */
|
||||
/* */
|
||||
/* FT_CALLBACK_DEF is used to _define_ a callback function, */
|
||||
/* located in the same source code file as the structure that uses */
|
||||
/* it. */
|
||||
/* */
|
||||
/* FT_BASE_CALLBACK and FT_BASE_CALLBACK_DEF are used to declare */
|
||||
/* and define a callback function, respectively, in a similar way */
|
||||
/* as FT_BASE and FT_BASE_DEF work. */
|
||||
/* */
|
||||
/* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
|
||||
/* contains pointers to callback functions. */
|
||||
/* */
|
||||
/* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */
|
||||
/* that contains pointers to callback functions. */
|
||||
/* */
|
||||
/* */
|
||||
/* Some 16bit compilers have to redefine these macros to insert */
|
||||
/* the infamous `_cdecl` or `__fastcall` declarations. */
|
||||
/* */
|
||||
/*
|
||||
* This is special. Within C++, you must specify `extern "C"` for
|
||||
* functions which are used via function pointers, and you also
|
||||
* must do that for structures which contain function pointers to
|
||||
* assure C linkage -- it's not possible to have (local) anonymous
|
||||
* functions which are accessed by (global) function pointers.
|
||||
*
|
||||
*
|
||||
* FT_CALLBACK_DEF is used to _define_ a callback function,
|
||||
* located in the same source code file as the structure that uses
|
||||
* it. FT_COMPARE_DEF, in addition, ensures the `cdecl` calling
|
||||
* convention on x86, required by the C library function `qsort`.
|
||||
*
|
||||
* FT_BASE_CALLBACK and FT_BASE_CALLBACK_DEF are used to declare
|
||||
* and define a callback function, respectively, in a similar way
|
||||
* as FT_BASE and FT_BASE_DEF work.
|
||||
*
|
||||
* FT_CALLBACK_TABLE is used to _declare_ a constant variable that
|
||||
* contains pointers to callback functions.
|
||||
*
|
||||
* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable
|
||||
* that contains pointers to callback functions.
|
||||
*
|
||||
*
|
||||
* Some 16bit compilers have to redefine these macros to insert
|
||||
* the infamous `_cdecl` or `__fastcall` declarations.
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
#define FT_CALLBACK_DEF( x ) extern "C" x
|
||||
#else
|
||||
#define FT_CALLBACK_DEF( x ) static x
|
||||
#endif
|
||||
|
||||
#if defined( __i386__ )
|
||||
#define FT_COMPARE_DEF( x ) FT_CALLBACK_DEF( x ) __attribute__(( cdecl ))
|
||||
#elif defined( _M_IX86 )
|
||||
#define FT_COMPARE_DEF( x ) FT_CALLBACK_DEF( x ) __cdecl
|
||||
#else
|
||||
#define FT_COMPARE_DEF( x ) FT_CALLBACK_DEF( x )
|
||||
#endif
|
||||
|
||||
#define FT_BASE_CALLBACK( x ) FT_FUNCTION_DECLARATION( x )
|
||||
#define FT_BASE_CALLBACK_DEF( x ) FT_FUNCTION_DEFINITION( x )
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Arithmetic computations (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -359,8 +359,8 @@ FT_BEGIN_HEADER
|
||||
|
||||
#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
|
||||
|
||||
#if defined( __GNUC__ ) && \
|
||||
( __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 4 ) )
|
||||
#if defined( __clang__ ) || ( defined( __GNUC__ ) && \
|
||||
( __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 4 ) ) )
|
||||
|
||||
#if FT_SIZEOF_INT == 4
|
||||
|
||||
@ -370,12 +370,25 @@ FT_BEGIN_HEADER
|
||||
|
||||
#define FT_MSB( x ) ( 31 - __builtin_clzl( x ) )
|
||||
|
||||
#endif /* __GNUC__ */
|
||||
#endif
|
||||
|
||||
#elif defined( _MSC_VER ) && _MSC_VER >= 1400
|
||||
|
||||
#elif defined( _MSC_VER ) && ( _MSC_VER >= 1400 )
|
||||
#if defined( _WIN32_WCE )
|
||||
|
||||
#if FT_SIZEOF_INT == 4
|
||||
#include <cmnintrin.h>
|
||||
#pragma intrinsic( _CountLeadingZeros )
|
||||
|
||||
#define FT_MSB( x ) ( 31 - _CountLeadingZeros( x ) )
|
||||
|
||||
#elif defined( _M_ARM64 ) || defined( _M_ARM )
|
||||
|
||||
#include <intrin.h>
|
||||
#pragma intrinsic( _CountLeadingZeros )
|
||||
|
||||
#define FT_MSB( x ) ( 31 - _CountLeadingZeros( x ) )
|
||||
|
||||
#elif defined( _M_IX86 ) || defined( _M_AMD64 ) || defined( _M_IA64 )
|
||||
|
||||
#include <intrin.h>
|
||||
#pragma intrinsic( _BitScanReverse )
|
||||
@ -391,15 +404,27 @@ FT_BEGIN_HEADER
|
||||
return (FT_Int32)where;
|
||||
}
|
||||
|
||||
#define FT_MSB( x ) ( FT_MSB_i386( x ) )
|
||||
#define FT_MSB( x ) FT_MSB_i386( x )
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _MSC_VER */
|
||||
#elif defined( __DECC ) || defined( __DECCXX )
|
||||
|
||||
#include <builtins.h>
|
||||
|
||||
#define FT_MSB( x ) (FT_Int)( 63 - _leadz( x ) )
|
||||
|
||||
#elif defined( _CRAYC )
|
||||
|
||||
#include <intrinsics.h>
|
||||
|
||||
#define FT_MSB( x ) (FT_Int)( 31 - _leadz32( x ) )
|
||||
|
||||
#endif /* FT_MSB macro definitions */
|
||||
|
||||
#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
|
||||
|
||||
|
||||
#ifndef FT_MSB
|
||||
|
||||
FT_BASE( FT_Int )
|
||||
@ -487,7 +512,7 @@ FT_BEGIN_HEADER
|
||||
#define NEG_INT32( a ) \
|
||||
(FT_Int32)( (FT_UInt32)0 - (FT_UInt32)(a) )
|
||||
|
||||
#ifdef FT_LONG64
|
||||
#ifdef FT_INT64
|
||||
|
||||
#define ADD_INT64( a, b ) \
|
||||
(FT_Int64)( (FT_UInt64)(a) + (FT_UInt64)(b) )
|
||||
@ -498,7 +523,7 @@ FT_BEGIN_HEADER
|
||||
#define NEG_INT64( a ) \
|
||||
(FT_Int64)( (FT_UInt64)0 - (FT_UInt64)(a) )
|
||||
|
||||
#endif /* FT_LONG64 */
|
||||
#endif /* FT_INT64 */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Debugging and logging component (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -31,9 +31,24 @@
|
||||
|
||||
#include "compiler-macros.h"
|
||||
|
||||
#ifdef FT_DEBUG_LOGGING
|
||||
#define DLG_STATIC
|
||||
#include <dlg/output.h>
|
||||
#include <dlg/dlg.h>
|
||||
|
||||
#include <freetype/ftlogging.h>
|
||||
#endif /* FT_DEBUG_LOGGING */
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
/* force the definition of FT_DEBUG_LEVEL_TRACE if FT_DEBUG_LOGGING is */
|
||||
/* already defined. */
|
||||
/* */
|
||||
#ifdef FT_DEBUG_LOGGING
|
||||
#undef FT_DEBUG_LEVEL_TRACE
|
||||
#define FT_DEBUG_LEVEL_TRACE
|
||||
#endif
|
||||
|
||||
/* force the definition of FT_DEBUG_LEVEL_ERROR if FT_DEBUG_LEVEL_TRACE */
|
||||
/* is already defined; this simplifies the following #ifdefs */
|
||||
@ -82,20 +97,66 @@ FT_BEGIN_HEADER
|
||||
* Each component must define the macro FT_COMPONENT to a valid FT_Trace
|
||||
* value before using any TRACE macro.
|
||||
*
|
||||
* To get consistent logging output, there should be no newline character
|
||||
* (i.e., '\n') or a single trailing one in the message string of
|
||||
* `FT_TRACEx` and `FT_ERROR`.
|
||||
*/
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* If FT_DEBUG_LOGGING is enabled, tracing messages are sent to dlg's API.
|
||||
* If FT_DEBUG_LOGGING is disabled, tracing messages are sent to
|
||||
* `FT_Message` (defined in ftdebug.c).
|
||||
*/
|
||||
#ifdef FT_DEBUG_LOGGING
|
||||
|
||||
/* we need two macros to convert the names of `FT_COMPONENT` to a string */
|
||||
#define FT_LOGGING_TAG( x ) FT_LOGGING_TAG_( x )
|
||||
#define FT_LOGGING_TAG_( x ) #x
|
||||
|
||||
/* we need two macros to convert the component and the trace level */
|
||||
/* to a string that combines them */
|
||||
#define FT_LOGGING_TAGX( x, y ) FT_LOGGING_TAGX_( x, y )
|
||||
#define FT_LOGGING_TAGX_( x, y ) #x ":" #y
|
||||
|
||||
|
||||
#define FT_LOG( level, varformat ) \
|
||||
do \
|
||||
{ \
|
||||
const char* dlg_tag = FT_LOGGING_TAGX( FT_COMPONENT, level ); \
|
||||
\
|
||||
\
|
||||
ft_add_tag( dlg_tag ); \
|
||||
if ( ft_trace_levels[FT_TRACE_COMP( FT_COMPONENT )] >= level ) \
|
||||
{ \
|
||||
if ( custom_output_handler != NULL ) \
|
||||
FT_Logging_Callback varformat; \
|
||||
else \
|
||||
dlg_trace varformat; \
|
||||
} \
|
||||
ft_remove_tag( dlg_tag ); \
|
||||
} while( 0 )
|
||||
|
||||
#else /* !FT_DEBUG_LOGGING */
|
||||
|
||||
#define FT_LOG( level, varformat ) \
|
||||
do \
|
||||
{ \
|
||||
if ( ft_trace_levels[FT_TRACE_COMP( FT_COMPONENT )] >= level ) \
|
||||
FT_Message varformat; \
|
||||
} while ( 0 )
|
||||
|
||||
#endif /* !FT_DEBUG_LOGGING */
|
||||
|
||||
|
||||
#ifdef FT_DEBUG_LEVEL_TRACE
|
||||
|
||||
/* we need two macros here to make cpp expand `FT_COMPONENT' */
|
||||
#define FT_TRACE_COMP( x ) FT_TRACE_COMP_( x )
|
||||
#define FT_TRACE_COMP_( x ) trace_ ## x
|
||||
|
||||
#define FT_TRACE( level, varformat ) \
|
||||
do \
|
||||
{ \
|
||||
if ( ft_trace_levels[FT_TRACE_COMP( FT_COMPONENT )] >= level ) \
|
||||
FT_Message varformat; \
|
||||
} while ( 0 )
|
||||
#define FT_TRACE( level, varformat ) FT_LOG( level, varformat )
|
||||
|
||||
#else /* !FT_DEBUG_LEVEL_TRACE */
|
||||
|
||||
@ -204,7 +265,32 @@ FT_BEGIN_HEADER
|
||||
|
||||
#ifdef FT_DEBUG_LEVEL_ERROR
|
||||
|
||||
#define FT_ERROR( varformat ) FT_Message varformat
|
||||
/**************************************************************************
|
||||
*
|
||||
* If FT_DEBUG_LOGGING is enabled, error messages are sent to dlg's API.
|
||||
* If FT_DEBUG_LOGGING is disabled, error messages are sent to `FT_Message`
|
||||
* (defined in ftdebug.c).
|
||||
*
|
||||
*/
|
||||
#ifdef FT_DEBUG_LOGGING
|
||||
|
||||
#define FT_ERROR( varformat ) \
|
||||
do \
|
||||
{ \
|
||||
const char* dlg_tag = FT_LOGGING_TAG( FT_COMPONENT ); \
|
||||
\
|
||||
\
|
||||
ft_add_tag( dlg_tag ); \
|
||||
dlg_trace varformat; \
|
||||
ft_remove_tag( dlg_tag ); \
|
||||
} while ( 0 )
|
||||
|
||||
#else /* !FT_DEBUG_LOGGING */
|
||||
|
||||
#define FT_ERROR( varformat ) FT_Message varformat
|
||||
|
||||
#endif /* !FT_DEBUG_LOGGING */
|
||||
|
||||
|
||||
#else /* !FT_DEBUG_LEVEL_ERROR */
|
||||
|
||||
@ -277,6 +363,77 @@ FT_BEGIN_HEADER
|
||||
FT_BASE( void )
|
||||
ft_debug_init( void );
|
||||
|
||||
|
||||
#ifdef FT_DEBUG_LOGGING
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* 'dlg' uses output handlers to control how and where log messages are
|
||||
* printed. Therefore we need to define a default output handler for
|
||||
* FreeType.
|
||||
*/
|
||||
FT_BASE( void )
|
||||
ft_log_handler( const struct dlg_origin* origin,
|
||||
const char* string,
|
||||
void* data );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* 1. `ft_default_log_handler` stores the function pointer that is used
|
||||
* internally by FreeType to print logs to a file.
|
||||
*
|
||||
* 2. `custom_output_handler` stores the function pointer to the callback
|
||||
* function provided by the user.
|
||||
*
|
||||
* It is defined in `ftdebug.c`.
|
||||
*/
|
||||
extern dlg_handler ft_default_log_handler;
|
||||
extern FT_Custom_Log_Handler custom_output_handler;
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* If FT_DEBUG_LOGGING macro is enabled, FreeType needs to initialize and
|
||||
* un-initialize `FILE*`.
|
||||
*
|
||||
* These functions are defined in `ftdebug.c`.
|
||||
*/
|
||||
FT_BASE( void )
|
||||
ft_logging_init( void );
|
||||
|
||||
FT_BASE( void )
|
||||
ft_logging_deinit( void );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* For printing the name of `FT_COMPONENT` along with the actual log we
|
||||
* need to add a tag with the name of `FT_COMPONENT`.
|
||||
*
|
||||
* These functions are defined in `ftdebug.c`.
|
||||
*/
|
||||
FT_BASE( void )
|
||||
ft_add_tag( const char* tag );
|
||||
|
||||
FT_BASE( void )
|
||||
ft_remove_tag( const char* tag );
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* A function to print log data using a custom callback logging function
|
||||
* (which is set using `FT_Set_Log_Handler`).
|
||||
*
|
||||
* This function is defined in `ftdebug.c`.
|
||||
*/
|
||||
FT_BASE( void )
|
||||
FT_Logging_Callback( const char* fmt,
|
||||
... );
|
||||
|
||||
#endif /* FT_DEBUG_LOGGING */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
#endif /* FTDEBUG_H_ */
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType internal font driver interface (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* The FreeType glyph loader (specification).
|
||||
*
|
||||
* Copyright (C) 2002-2020 by
|
||||
* Copyright (C) 2002-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -22,6 +22,7 @@
|
||||
|
||||
#include <freetype/freetype.h>
|
||||
|
||||
#include "compiler-macros.h"
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* The FreeType memory management macros (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -344,14 +344,13 @@ extern "C++"
|
||||
#define FT_RENEW_ARRAY( ptr, curcnt, newcnt ) \
|
||||
FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) )
|
||||
|
||||
#define FT_QNEW( ptr ) \
|
||||
FT_MEM_SET_ERROR( FT_MEM_QNEW( ptr ) )
|
||||
#define FT_QNEW( ptr ) FT_MEM_SET_ERROR( FT_MEM_QNEW( ptr ) )
|
||||
|
||||
#define FT_QNEW_ARRAY( ptr, count ) \
|
||||
FT_MEM_SET_ERROR( FT_MEM_NEW_ARRAY( ptr, count ) )
|
||||
#define FT_QNEW_ARRAY( ptr, count ) \
|
||||
FT_MEM_SET_ERROR( FT_MEM_QNEW_ARRAY( ptr, count ) )
|
||||
|
||||
#define FT_QRENEW_ARRAY( ptr, curcnt, newcnt ) \
|
||||
FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) )
|
||||
#define FT_QRENEW_ARRAY( ptr, curcnt, newcnt ) \
|
||||
FT_MEM_SET_ERROR( FT_MEM_QRENEW_ARRAY( ptr, curcnt, newcnt ) )
|
||||
|
||||
|
||||
FT_BASE( FT_Pointer )
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* The FreeType private base classes (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -673,7 +673,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
|
||||
/* Set the metrics according to a size request. */
|
||||
FT_BASE( void )
|
||||
FT_BASE( FT_Error )
|
||||
FT_Request_Metrics( FT_Face face,
|
||||
FT_Size_Request req );
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Get and set properties of PostScript drivers (specification).
|
||||
*
|
||||
* Copyright (C) 2017-2020 by
|
||||
* Copyright (C) 2017-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Embedded resource forks accessor (specification).
|
||||
*
|
||||
* Copyright (C) 2004-2020 by
|
||||
* Copyright (C) 2004-2021 by
|
||||
* Masatake YAMATO and Redhat K.K.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* The FreeType services (specification only).
|
||||
*
|
||||
* Copyright (C) 2003-2020 by
|
||||
* Copyright (C) 2003-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Stream handling (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -196,9 +196,9 @@ FT_BEGIN_HEADER
|
||||
FT_BYTE_U32( p, 2, 8 ) | \
|
||||
FT_BYTE_U32( p, 3, 0 ) )
|
||||
|
||||
#define FT_PEEK_OFF3( p ) FT_INT32( FT_BYTE_U32( p, 0, 16 ) | \
|
||||
FT_BYTE_U32( p, 1, 8 ) | \
|
||||
FT_BYTE_U32( p, 2, 0 ) )
|
||||
#define FT_PEEK_OFF3( p ) ( FT_INT32( FT_BYTE_U32( p, 0, 24 ) | \
|
||||
FT_BYTE_U32( p, 1, 16 ) | \
|
||||
FT_BYTE_U32( p, 2, 8 ) ) >> 8 )
|
||||
|
||||
#define FT_PEEK_UOFF3( p ) FT_UINT32( FT_BYTE_U32( p, 0, 16 ) | \
|
||||
FT_BYTE_U32( p, 1, 8 ) | \
|
||||
@ -220,9 +220,9 @@ FT_BEGIN_HEADER
|
||||
FT_BYTE_U32( p, 1, 8 ) | \
|
||||
FT_BYTE_U32( p, 0, 0 ) )
|
||||
|
||||
#define FT_PEEK_OFF3_LE( p ) FT_INT32( FT_BYTE_U32( p, 2, 16 ) | \
|
||||
FT_BYTE_U32( p, 1, 8 ) | \
|
||||
FT_BYTE_U32( p, 0, 0 ) )
|
||||
#define FT_PEEK_OFF3_LE( p ) ( FT_INT32( FT_BYTE_U32( p, 2, 24 ) | \
|
||||
FT_BYTE_U32( p, 1, 16 ) | \
|
||||
FT_BYTE_U32( p, 0, 8 ) ) >> 8 )
|
||||
|
||||
#define FT_PEEK_UOFF3_LE( p ) FT_UINT32( FT_BYTE_U32( p, 2, 16 ) | \
|
||||
FT_BYTE_U32( p, 1, 8 ) | \
|
||||
@ -305,11 +305,10 @@ FT_BEGIN_HEADER
|
||||
#else
|
||||
#define FT_GET_MACRO( func, type ) ( (type)func( stream ) )
|
||||
|
||||
#define FT_GET_CHAR() FT_GET_MACRO( FT_Stream_GetChar, FT_Char )
|
||||
#define FT_GET_BYTE() FT_GET_MACRO( FT_Stream_GetChar, FT_Byte )
|
||||
#define FT_GET_CHAR() FT_GET_MACRO( FT_Stream_GetByte, FT_Char )
|
||||
#define FT_GET_BYTE() FT_GET_MACRO( FT_Stream_GetByte, FT_Byte )
|
||||
#define FT_GET_SHORT() FT_GET_MACRO( FT_Stream_GetUShort, FT_Short )
|
||||
#define FT_GET_USHORT() FT_GET_MACRO( FT_Stream_GetUShort, FT_UShort )
|
||||
#define FT_GET_OFF3() FT_GET_MACRO( FT_Stream_GetUOffset, FT_Long )
|
||||
#define FT_GET_UOFF3() FT_GET_MACRO( FT_Stream_GetUOffset, FT_ULong )
|
||||
#define FT_GET_LONG() FT_GET_MACRO( FT_Stream_GetULong, FT_Long )
|
||||
#define FT_GET_ULONG() FT_GET_MACRO( FT_Stream_GetULong, FT_ULong )
|
||||
@ -333,11 +332,10 @@ FT_BEGIN_HEADER
|
||||
* `FT_STREAM_POS'. They use the full machinery to check whether a read is
|
||||
* valid.
|
||||
*/
|
||||
#define FT_READ_BYTE( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Byte, var )
|
||||
#define FT_READ_CHAR( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Char, var )
|
||||
#define FT_READ_BYTE( var ) FT_READ_MACRO( FT_Stream_ReadByte, FT_Byte, var )
|
||||
#define FT_READ_CHAR( var ) FT_READ_MACRO( FT_Stream_ReadByte, FT_Char, var )
|
||||
#define FT_READ_SHORT( var ) FT_READ_MACRO( FT_Stream_ReadUShort, FT_Short, var )
|
||||
#define FT_READ_USHORT( var ) FT_READ_MACRO( FT_Stream_ReadUShort, FT_UShort, var )
|
||||
#define FT_READ_OFF3( var ) FT_READ_MACRO( FT_Stream_ReadUOffset, FT_Long, var )
|
||||
#define FT_READ_UOFF3( var ) FT_READ_MACRO( FT_Stream_ReadUOffset, FT_ULong, var )
|
||||
#define FT_READ_LONG( var ) FT_READ_MACRO( FT_Stream_ReadULong, FT_Long, var )
|
||||
#define FT_READ_ULONG( var ) FT_READ_MACRO( FT_Stream_ReadULong, FT_ULong, var )
|
||||
@ -457,8 +455,8 @@ FT_BEGIN_HEADER
|
||||
|
||||
|
||||
/* read a byte from an entered frame */
|
||||
FT_BASE( FT_Char )
|
||||
FT_Stream_GetChar( FT_Stream stream );
|
||||
FT_BASE( FT_Byte )
|
||||
FT_Stream_GetByte( FT_Stream stream );
|
||||
|
||||
/* read a 16-bit big-endian unsigned integer from an entered frame */
|
||||
FT_BASE( FT_UShort )
|
||||
@ -482,8 +480,8 @@ FT_BEGIN_HEADER
|
||||
|
||||
|
||||
/* read a byte from a stream */
|
||||
FT_BASE( FT_Char )
|
||||
FT_Stream_ReadChar( FT_Stream stream,
|
||||
FT_BASE( FT_Byte )
|
||||
FT_Stream_ReadByte( FT_Stream stream,
|
||||
FT_Error* error );
|
||||
|
||||
/* read a 16-bit big-endian unsigned integer from a stream */
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Tracing handling (specification only).
|
||||
*
|
||||
* Copyright (C) 2002-2020 by
|
||||
* Copyright (C) 2002-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
@ -18,6 +18,11 @@
|
||||
|
||||
/* definitions of trace levels for FreeType 2 */
|
||||
|
||||
/* the maximum string length (if the argument to `FT_TRACE_DEF` */
|
||||
/* gets used as a string) plus one charachter for ':' plus */
|
||||
/* another one for the trace level */
|
||||
#define FT_MAX_TRACE_LEVEL_LENGTH (9 + 1 + 1)
|
||||
|
||||
/* the first level must always be `trace_any' */
|
||||
FT_TRACE_DEF( any )
|
||||
|
||||
@ -38,12 +43,14 @@ FT_TRACE_DEF( checksum ) /* bitmap checksum (ftobjs.c) */
|
||||
FT_TRACE_DEF( mm ) /* MM interface (ftmm.c) */
|
||||
FT_TRACE_DEF( psprops ) /* PS driver properties (ftpsprop.c) */
|
||||
FT_TRACE_DEF( raccess ) /* resource fork accessor (ftrfork.c) */
|
||||
FT_TRACE_DEF( raster ) /* monochrome rasterizer (ftraster.c) */
|
||||
FT_TRACE_DEF( smooth ) /* anti-aliasing raster (ftgrays.c) */
|
||||
FT_TRACE_DEF( synth ) /* bold/slant synthesizer (ftsynth.c) */
|
||||
|
||||
/* Cache sub-system */
|
||||
FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */
|
||||
/* rasterizers */
|
||||
FT_TRACE_DEF( raster ) /* monochrome rasterizer (ftraster.c) */
|
||||
FT_TRACE_DEF( smooth ) /* anti-aliasing raster (ftgrays.c) */
|
||||
|
||||
/* cache sub-system */
|
||||
FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */
|
||||
|
||||
/* SFNT driver components */
|
||||
FT_TRACE_DEF( sfdriver ) /* SFNT font driver (sfdriver.c) */
|
||||
@ -77,6 +84,7 @@ FT_TRACE_DEF( t1objs )
|
||||
FT_TRACE_DEF( t1parse )
|
||||
|
||||
/* PostScript helper module `psaux' */
|
||||
FT_TRACE_DEF( afmparse )
|
||||
FT_TRACE_DEF( cffdecode )
|
||||
FT_TRACE_DEF( psconv )
|
||||
FT_TRACE_DEF( psobjs )
|
||||
@ -151,8 +159,10 @@ FT_TRACE_DEF( afglobal )
|
||||
FT_TRACE_DEF( afhints )
|
||||
FT_TRACE_DEF( afmodule )
|
||||
FT_TRACE_DEF( aflatin )
|
||||
FT_TRACE_DEF( aflatin2 )
|
||||
FT_TRACE_DEF( afshaper )
|
||||
FT_TRACE_DEF( afwarp )
|
||||
|
||||
/* SDF components */
|
||||
FT_TRACE_DEF( sdf ) /* signed distance raster for outlines (ftsdf.c) */
|
||||
FT_TRACE_DEF( bsdf ) /* signed distance raster for bitmaps (ftbsdf.c) */
|
||||
|
||||
/* END */
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType validation support (specification).
|
||||
*
|
||||
* Copyright (C) 2004-2020 by
|
||||
* Copyright (C) 2004-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -1,67 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* internal.h
|
||||
*
|
||||
* Internal header files (specification only).
|
||||
*
|
||||
* Copyright (C) 1996-2020 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* This file is automatically included by `ft2build.h`. Do not include it
|
||||
* manually!
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#define FT_INTERNAL_OBJECTS_H <freetype/internal/ftobjs.h>
|
||||
#define FT_INTERNAL_STREAM_H <freetype/internal/ftstream.h>
|
||||
#define FT_INTERNAL_MEMORY_H <freetype/internal/ftmemory.h>
|
||||
#define FT_INTERNAL_DEBUG_H <freetype/internal/ftdebug.h>
|
||||
#define FT_INTERNAL_CALC_H <freetype/internal/ftcalc.h>
|
||||
#define FT_INTERNAL_HASH_H <freetype/internal/fthash.h>
|
||||
#define FT_INTERNAL_DRIVER_H <freetype/internal/ftdrv.h>
|
||||
#define FT_INTERNAL_TRACE_H <freetype/internal/fttrace.h>
|
||||
#define FT_INTERNAL_GLYPH_LOADER_H <freetype/internal/ftgloadr.h>
|
||||
#define FT_INTERNAL_SFNT_H <freetype/internal/sfnt.h>
|
||||
#define FT_INTERNAL_SERVICE_H <freetype/internal/ftserv.h>
|
||||
#define FT_INTERNAL_RFORK_H <freetype/internal/ftrfork.h>
|
||||
#define FT_INTERNAL_VALIDATE_H <freetype/internal/ftvalid.h>
|
||||
|
||||
#define FT_INTERNAL_TRUETYPE_TYPES_H <freetype/internal/tttypes.h>
|
||||
#define FT_INTERNAL_TYPE1_TYPES_H <freetype/internal/t1types.h>
|
||||
#define FT_INTERNAL_WOFF_TYPES_H <freetype/internal/wofftypes.h>
|
||||
|
||||
#define FT_INTERNAL_POSTSCRIPT_AUX_H <freetype/internal/psaux.h>
|
||||
#define FT_INTERNAL_POSTSCRIPT_HINTS_H <freetype/internal/pshints.h>
|
||||
#define FT_INTERNAL_POSTSCRIPT_PROPS_H <freetype/internal/ftpsprop.h>
|
||||
|
||||
#define FT_INTERNAL_AUTOHINT_H <freetype/internal/autohint.h>
|
||||
|
||||
#define FT_INTERNAL_CFF_TYPES_H <freetype/internal/cfftypes.h>
|
||||
#define FT_INTERNAL_CFF_OBJECTS_TYPES_H <freetype/internal/cffotypes.h>
|
||||
|
||||
|
||||
#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
|
||||
|
||||
/* We disable the warning `conditional expression is constant' here */
|
||||
/* in order to compile cleanly with the maximum level of warnings. */
|
||||
/* In particular, the warning complains about stuff like `while(0)' */
|
||||
/* which is very useful in macro definitions. There is no benefit */
|
||||
/* in having it enabled. */
|
||||
#pragma warning( disable : 4127 )
|
||||
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
|
||||
/* END */
|
@ -5,7 +5,7 @@
|
||||
* Auxiliary functions and data structures related to PostScript fonts
|
||||
* (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* Copyright (C) 1996-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -6,7 +6,7 @@
|
||||
* recorders (specification only). These are used to support native
|
||||
* T1/T2 hints in the 'type1', 'cid', and 'cff' font drivers.
|
||||
*
|
||||
* Copyright (C) 2001-2020 by
|
||||
* Copyright (C) 2001-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* The FreeType BDF services (specification).
|
||||
*
|
||||
* Copyright (C) 2003-2020 by
|
||||
* Copyright (C) 2003-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* The FreeType CFF tables loader service (specification).
|
||||
*
|
||||
* Copyright (C) 2017-2020 by
|
||||
* Copyright (C) 2017-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* The FreeType CID font services (specification).
|
||||
*
|
||||
* Copyright (C) 2007-2020 by
|
||||
* Copyright (C) 2007-2021 by
|
||||
* Derek Clegg and Michael Toftdal.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* The FreeType font format service (specification only).
|
||||
*
|
||||
* Copyright (C) 2003-2020 by
|
||||
* Copyright (C) 2003-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* The FreeType glyph dictionary services (specification).
|
||||
*
|
||||
* Copyright (C) 2003-2020 by
|
||||
* Copyright (C) 2003-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* FreeType API for validating TrueTypeGX/AAT tables (specification).
|
||||
*
|
||||
* Copyright (C) 2004-2020 by
|
||||
* Copyright (C) 2004-2021 by
|
||||
* Masatake YAMATO, Red Hat K.K.,
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* The FreeType Kerning service (specification).
|
||||
*
|
||||
* Copyright (C) 2006-2020 by
|
||||
* Copyright (C) 2006-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* The FreeType services for metrics variations (specification).
|
||||
*
|
||||
* Copyright (C) 2016-2020 by
|
||||
* Copyright (C) 2016-2021 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user