29 INLINE
bool FreetypeFont::
30 set_point_size(PN_stdfloat point_size) {
31 _point_size = point_size;
38 INLINE PN_stdfloat FreetypeFont::
39 get_point_size()
const {
54 INLINE
bool FreetypeFont::
55 set_pixels_per_unit(PN_stdfloat pixels_per_unit) {
56 _requested_pixels_per_unit = pixels_per_unit;
63 INLINE PN_stdfloat FreetypeFont::
64 get_pixels_per_unit()
const {
65 return _tex_pixels_per_unit;
73 INLINE
bool FreetypeFont::
74 set_pixel_size(PN_stdfloat pixel_size) {
75 return set_pixels_per_unit(pixel_size * _points_per_unit / _point_size);
81 INLINE PN_stdfloat FreetypeFont::
82 get_pixel_size()
const {
83 return _tex_pixels_per_unit * _point_size / _points_per_unit;
97 INLINE
bool FreetypeFont::
98 set_scale_factor(PN_stdfloat scale_factor) {
99 _requested_scale_factor = scale_factor;
100 return reset_scale();
106 INLINE PN_stdfloat FreetypeFont::
107 get_scale_factor()
const {
108 return _scale_factor;
121 INLINE
void FreetypeFont::
122 set_native_antialias(
bool native_antialias) {
123 _native_antialias = native_antialias;
130 INLINE
bool FreetypeFont::
131 get_native_antialias()
const {
132 return _native_antialias;
144 INLINE
int FreetypeFont::
145 get_font_pixel_size()
const {
146 return _pixel_height;
152 INLINE PN_stdfloat FreetypeFont::
153 get_line_height()
const {
160 INLINE PN_stdfloat FreetypeFont::
161 get_space_advance()
const {
162 return _space_advance;
169 INLINE PN_stdfloat FreetypeFont::
170 get_points_per_unit() {
171 return _points_per_unit;
178 INLINE PN_stdfloat FreetypeFont::
179 get_points_per_inch() {
180 return _points_per_inch;
189 INLINE
void FreetypeFont::
190 set_winding_order(WindingOrder winding_order) {
191 _winding_order = winding_order;
197 INLINE FreetypeFont::WindingOrder FreetypeFont::
198 get_winding_order()
const {
199 return _winding_order;
208 INLINE FT_Face FreetypeFont::
209 acquire_face()
const {
210 nassertr(_face !=
nullptr,
nullptr);
211 return _face->acquire_face(_char_size, _dpi, _pixel_width, _pixel_height);
218 INLINE
void FreetypeFont::
219 release_face(FT_Face face)
const {
220 nassertv(_face !=
nullptr);
221 _face->release_face(face);
227 INLINE FreetypeFont::ContourPoint::
228 ContourPoint(
const LPoint2 &p,
const LVector2 &in,
const LVector2 &out) :
229 _p(p), _in(in), _out(out), _radius(0)
236 INLINE FreetypeFont::ContourPoint::
237 ContourPoint(PN_stdfloat px, PN_stdfloat py, PN_stdfloat tx, PN_stdfloat ty) :
238 _p(px, py), _in(tx, ty), _out(tx, ty), _radius(0)
247 INLINE
void FreetypeFont::ContourPoint::
248 connect_to(
const LVector2 &out) {
250 if (_in.dot(_out) > 0.7071) {
252 LVector2 av = (_in + _out) * 0.5f;