From 753d677343cc8b2ee6cc63a7525ef4a9dab4ef06 Mon Sep 17 00:00:00 2001 From: Danil Alexeev Date: Sat, 20 Nov 2021 20:47:01 +0300 Subject: [PATCH] Expose `FontData::{set,get}_fixed_size` methods --- doc/classes/FontData.xml | 13 +++++++++++++ scene/resources/font.cpp | 3 +++ 2 files changed, 16 insertions(+) diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml index ccfe861c920..c403d238c55 100644 --- a/doc/classes/FontData.xml +++ b/doc/classes/FontData.xml @@ -93,6 +93,12 @@ Returns font descent (number of pixels below the baseline). + + + + Returns font fixed size. + + @@ -481,6 +487,13 @@ Sets the font descent (number of pixels below the baseline). + + + + + Sets the fixed size for the font. + + diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp index d9de47afc73..6cd42e1456c 100644 --- a/scene/resources/font.cpp +++ b/scene/resources/font.cpp @@ -88,6 +88,9 @@ void FontData::_bind_methods() { ClassDB::bind_method(D_METHOD("set_msdf_size", "msdf_size"), &FontData::set_msdf_size); ClassDB::bind_method(D_METHOD("get_msdf_size"), &FontData::get_msdf_size); + ClassDB::bind_method(D_METHOD("set_fixed_size", "fixed_size"), &FontData::set_fixed_size); + ClassDB::bind_method(D_METHOD("get_fixed_size"), &FontData::get_fixed_size); + ClassDB::bind_method(D_METHOD("set_force_autohinter", "force_autohinter"), &FontData::set_force_autohinter); ClassDB::bind_method(D_METHOD("is_force_autohinter"), &FontData::is_force_autohinter);