Blender V5.0
blf_glyph.cc File Reference
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ft2build.h>
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_math_color.h"
#include "BLI_math_geom.h"
#include "BLI_rect.h"
#include "BLF_api.hh"
#include "DNA_curve_types.h"
#include "GPU_capabilities.hh"
#include "blf_internal.hh"
#include "blf_internal_types.hh"
#include "BLI_math_vector.h"
#include "BLI_string_utf8.h"
#include "nanosvgrast.h"
#include "svg_icons.h"
#include "BLI_strict_flags.h"

Go to the source code of this file.

Classes

struct  UnicodeBlock

Macros

#define BLF_GAMMA_CORRECT_GLYPHS

Functions

Internal Utilities
static FT_Fixed to_16dot16 (const double val)
static float from_16dot16 (const FT_Fixed value)
Glyph Cache
static GlyphCacheBLFblf_glyph_cache_find (const FontBLF *font)
static GlyphCacheBLFblf_glyph_cache_new (FontBLF *font)
GlyphCacheBLFblf_glyph_cache_acquire (FontBLF *font)
void blf_glyph_cache_release (FontBLF *font)
void blf_glyph_cache_clear (FontBLF *font)
static GlyphBLFblf_glyph_cache_find_glyph (const GlyphCacheBLF *gc, const uint charcode, const uint8_t subpixel)
static uchar blf_glyph_gamma (const uchar c)
static GlyphBLFblf_glyph_cache_add_glyph (GlyphCacheBLF *gc, const FT_GlyphSlot glyph, const uint charcode, const FT_UInt glyph_index, const uint8_t subpixel)
static GlyphBLFblf_glyph_cache_add_blank (GlyphCacheBLF *gc, const uint charcode)
static GlyphBLFblf_glyph_cache_add_svg (GlyphCacheBLF *gc, const uint charcode, const bool color, blender::FunctionRef< void(std::string &)> edit_source_cb=nullptr)
Glyph Load
static FT_GlyphSlot blf_glyph_load (FontBLF *font, const FT_UInt glyph_index, const bool outline_only)
Glyph Render
static bool blf_glyph_render_bitmap (FontBLF *font, FT_GlyphSlot glyph)
Variations (Multiple Masters) support
static const FT_Var_Axis * blf_var_axis_by_tag (const FT_MM_Var *variations, const uint32_t tag, int *r_axis_index)
static FT_Fixed blf_factor_to_coordinate (const FT_Var_Axis *axis, const float factor)
static bool blf_glyph_set_variation_normalized (const FontBLF *font, FT_Fixed coords[], const uint32_t tag, const float factor)
static bool blf_glyph_set_variation_float (const FontBLF *font, FT_Fixed coords[], uint32_t tag, float *value)
static float blf_glyph_set_variation_weight (const FontBLF *font, FT_Fixed coords[], float current_weight, float target_weight)
static float blf_glyph_set_variation_slant (const FontBLF *font, FT_Fixed coords[], float current_degrees, float target_degrees)
static float blf_glyph_set_variation_width (const FontBLF *font, FT_Fixed coords[], float current_width, float target_width)
static float blf_glyph_set_variation_spacing (const FontBLF *font, FT_Fixed coords[], float current_spacing, float target_spacing)
static bool blf_glyph_set_variation_optical_size (const FontBLF *font, FT_Fixed coords[], const float points)
Glyph Transformations
static bool blf_glyph_transform_weight (FT_GlyphSlot glyph, float width, bool monospaced)
static bool blf_glyph_transform_slant (FT_GlyphSlot glyph, float degrees)
static bool blf_glyph_transform_width (FT_GlyphSlot glyph, float factor)
static bool blf_glyph_transform_spacing (FT_GlyphSlot glyph, float factor)
static bool blf_glyph_transform_monospace (FT_GlyphSlot glyph, int width)
Glyph Access (Ensure/Free)
static FT_GlyphSlot blf_glyph_render (FontBLF *settings_font, FontBLF *glyph_font, FT_UInt glyph_index, uint charcode, uint8_t subpixel, int fixed_width, bool outline_only)
GlyphBLFblf_glyph_ensure (FontBLF *font, GlyphCacheBLF *gc, const uint charcode, uint8_t subpixel)
GlyphBLFblf_glyph_ensure_icon (GlyphCacheBLF *gc, const uint icon_id, bool color, blender::FunctionRef< void(std::string &)> edit_source_cb)
GlyphBLFblf_glyph_ensure_subpixel (FontBLF *font, GlyphCacheBLF *gc, GlyphBLF *g, int32_t pen_x)
Glyph Bounds Calculation
static void blf_glyph_calc_rect (const GlyphBLF *g, const int x, const int y, rcti *r_rect)
static void blf_glyph_calc_rect_test (const GlyphBLF *g, const int x, const int y, rcti *r_rect)
static void blf_glyph_calc_rect_shadow (const GlyphBLF *g, const int x, const int y, const FontBLF *font, rcti *r_rect)
Glyph Drawing
static void blf_texture_draw (const GlyphBLF *g, const uchar color[4], const FontShadowType shadow, const int x1, const int y1, const int x2, const int y2)
void blf_glyph_draw (FontBLF *font, GlyphCacheBLF *gc, GlyphBLF *g, const int x, const int y)
Convert Glyph to Curves
static void blf_glyph_to_curves (const FT_Outline &ftoutline, ListBase *nurbsbase, const float scale)
static FT_GlyphSlot blf_glyphslot_ensure_outline (FontBLF *font, uint charcode, bool use_fallback)
bool blf_character_to_curves (FontBLF *font, uint unicode, ListBase *nurbsbase, const float scale, bool use_fallback, float *r_advance)

Glyph Unicode Block Lookup

This table can be used to find a coverage bit based on a charcode. Later we can get default language and script from codepoint.

static const UnicodeBlock unicode_blocks []
static const UnicodeBlockblf_charcode_to_unicode_block (const uint charcode)
static int blf_charcode_to_coverage_bit (const uint charcode)
static bool blf_font_has_coverage_bit (const FontBLF *font, const int coverage_bit)
static FT_UInt blf_glyph_index_from_charcode (FontBLF **font, const uint charcode)

Detailed Description

Glyph rendering, texturing and caching. Wraps Freetype and OpenGL functions.

Definition in file blf_glyph.cc.

Macro Definition Documentation

◆ BLF_GAMMA_CORRECT_GLYPHS

#define BLF_GAMMA_CORRECT_GLYPHS

Convert glyph coverage amounts to lightness values. Uses a LUT that perceptually improves anti-aliasing and results in text that looks a bit fuller and slightly brighter. This should be reconsidered in some - or all - cases when we transform the entire UI.

Definition at line 58 of file blf_glyph.cc.

Function Documentation

◆ blf_character_to_curves()

bool blf_character_to_curves ( FontBLF * font,
unsigned int unicode,
ListBase * nurbsbase,
const float scale,
bool use_fallback,
float * r_advance )

Convert a character's outlines into curves.

Returns
success if the character was found and converted.

Definition at line 1887 of file blf_glyph.cc.

References blf_glyph_to_curves(), blf_glyphslot_ensure_outline(), and float.

Referenced by BLF_character_to_curves().

◆ blf_charcode_to_coverage_bit()

int blf_charcode_to_coverage_bit ( const uint charcode)
static

◆ blf_charcode_to_unicode_block()

const UnicodeBlock * blf_charcode_to_unicode_block ( const uint charcode)
static

Find a unicode block that a charcode belongs to.

Definition at line 725 of file blf_glyph.cc.

References ARRAY_SIZE, max, min, and unicode_blocks.

Referenced by blf_charcode_to_coverage_bit().

◆ blf_factor_to_coordinate()

FT_Fixed blf_factor_to_coordinate ( const FT_Var_Axis * axis,
const float factor )
static

Convert a float factor to a fixed-point design coordinate. Currently unused because we are only dealing with known axes with specific functions, but this would be needed for unregistered, custom, or private tags. These are all uppercase axis tags.

Parameters
axisPointer to a design space axis structure.
factor-1 to 1 with 0 meaning "default"

Definition at line 972 of file blf_glyph.cc.

Referenced by blf_glyph_set_variation_normalized().

◆ blf_font_has_coverage_bit()

bool blf_font_has_coverage_bit ( const FontBLF * font,
const int coverage_bit )
static

Definition at line 774 of file blf_glyph.cc.

References FontBLF::unicode_ranges.

Referenced by blf_glyph_index_from_charcode().

◆ blf_glyph_cache_acquire()

◆ blf_glyph_cache_add_blank()

GlyphBLF * blf_glyph_cache_add_blank ( GlyphCacheBLF * gc,
const uint charcode )
static

◆ blf_glyph_cache_add_glyph()

GlyphBLF * blf_glyph_cache_add_glyph ( GlyphCacheBLF * gc,
const FT_GlyphSlot glyph,
const uint charcode,
const FT_UInt glyph_index,
const uint8_t subpixel )
static

◆ blf_glyph_cache_add_svg()

◆ blf_glyph_cache_clear()

void blf_glyph_cache_clear ( FontBLF * font)

◆ blf_glyph_cache_find()

◆ blf_glyph_cache_find_glyph()

GlyphBLF * blf_glyph_cache_find_glyph ( const GlyphCacheBLF * gc,
const uint charcode,
const uint8_t subpixel )
static

Try to find a glyph in cache.

Returns
nullptr if not found.

Definition at line 173 of file blf_glyph.cc.

References GlyphCacheBLF::glyphs, Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr_as(), and ptr.

Referenced by blf_glyph_ensure(), and blf_glyph_ensure_icon().

◆ blf_glyph_cache_new()

◆ blf_glyph_cache_release()

◆ blf_glyph_calc_rect()

void blf_glyph_calc_rect ( const GlyphBLF * g,
const int x,
const int y,
rcti * r_rect )
static

◆ blf_glyph_calc_rect_shadow()

void blf_glyph_calc_rect_shadow ( const GlyphBLF * g,
const int x,
const int y,
const FontBLF * font,
rcti * r_rect )
static

Definition at line 1455 of file blf_glyph.cc.

References blf_glyph_calc_rect(), FontBLF::shadow_x, FontBLF::shadow_y, x, and y.

Referenced by blf_glyph_draw().

◆ blf_glyph_calc_rect_test()

void blf_glyph_calc_rect_test ( const GlyphBLF * g,
const int x,
const int y,
rcti * r_rect )
static

◆ blf_glyph_draw()

◆ blf_glyph_ensure()

GlyphBLF * blf_glyph_ensure ( FontBLF * font,
GlyphCacheBLF * gc,
uint charcode,
uint8_t subpixel = 0 )

◆ blf_glyph_ensure_icon()

GlyphBLF * blf_glyph_ensure_icon ( GlyphCacheBLF * gc,
const uint icon_id,
bool color,
blender::FunctionRef< void(std::string &)> edit_source_cb )

◆ blf_glyph_ensure_subpixel()

◆ blf_glyph_gamma()

uchar blf_glyph_gamma ( const uchar c)
static

Gamma correction of glyph coverage values with widely-recommended gamma of 1.43. "The reasons are historical. Because so many programmers have neglected gamma blending for so long, people who have created fonts have tried to work around the problem of fonts looking too thin by just making the fonts thicker! Obviously it doesn't help the jaggedness, but it does make them look the proper weight, as originally intended. The obvious problem with this is that if we want to gamma blend correctly many older fonts will look wrong. So we compromise, and use a lower gamma value, so we get a bit better anti-aliasing, but the fonts don't look too heavy." https://www.puredevsoftware.com/blog/2019/01/22/sub-pixel-gamma-correct-font-rendering/

Definition at line 198 of file blf_glyph.cc.

Referenced by blf_glyph_cache_add_glyph().

◆ blf_glyph_index_from_charcode()

FT_UInt blf_glyph_index_from_charcode ( FontBLF ** font,
const uint charcode )
static

Return a glyph index from charcode. Not found returns zero, which is a valid printable character (.notdef or tofu). Font is allowed to change here.

Definition at line 786 of file blf_glyph.cc.

References BLF_CACHED, blf_charcode_to_coverage_bit(), BLF_DEFAULT, blf_font_has_coverage_bit(), blf_get_char_index(), BLF_LAST_RESORT, BLF_MAX_FONT, BLF_MONOSPACED, BLF_NO_FALLBACK, FontBLF::flags, global_font, and i.

Referenced by blf_glyph_ensure(), and blf_glyphslot_ensure_outline().

◆ blf_glyph_load()

FT_GlyphSlot blf_glyph_load ( FontBLF * font,
const FT_UInt glyph_index,
const bool outline_only )
static

Load a glyph into the glyph slot of a font's face object.

Definition at line 850 of file blf_glyph.cc.

References BLF_HINTING_FULL, BLF_HINTING_NONE, BLF_HINTING_SLIGHT, BLF_MONOCHROME, FontBLF::face, and FontBLF::flags.

Referenced by blf_glyph_render().

◆ blf_glyph_render()

◆ blf_glyph_render_bitmap()

bool blf_glyph_render_bitmap ( FontBLF * font,
FT_GlyphSlot glyph )
static

Convert a glyph from outlines to a bitmap that we can display.

Definition at line 898 of file blf_glyph.cc.

References BLF_HINTING_SLIGHT, BLF_MONOCHROME, ELEM, FontBLF::flags, and FontBLF::ft_lib.

Referenced by blf_glyph_render().

◆ blf_glyph_set_variation_float()

bool blf_glyph_set_variation_float ( const FontBLF * font,
FT_Fixed coords[],
uint32_t tag,
float * value )
static

Set a face variation axis to an exact float value

Parameters
coordsArray of design coordinates, per axis.
tagAxis tag, e.g. BLF_VARIATION_AXIS_OPTSIZE.
valueNew float value. Converted to 16.16 and clamped within allowed range.
Returns
success if able to set this value.

Definition at line 1020 of file blf_glyph.cc.

References blf_var_axis_by_tag(), BLF_VARIATIONS_MAX, CLAMP, from_16dot16(), to_16dot16(), and FontBLF::variations.

Referenced by blf_glyph_set_variation_optical_size(), blf_glyph_set_variation_slant(), blf_glyph_set_variation_spacing(), blf_glyph_set_variation_weight(), and blf_glyph_set_variation_width().

◆ blf_glyph_set_variation_normalized()

bool blf_glyph_set_variation_normalized ( const FontBLF * font,
FT_Fixed coords[],
const uint32_t tag,
const float factor )
static

Alter a face variation axis by a factor. Currently unused because we are only dealing with known axes with specific functions, but this would be needed for unregistered, custom, or private tags. These are all uppercase axis tags.

Parameters
coordsarray of design coordinates, per axis.
tagAxis tag, e.g. BLF_VARIATION_AXIS_WEIGHT.
factor-1 to 1 with 0 meaning "default"
Returns
success if able to set this value.

Definition at line 998 of file blf_glyph.cc.

References blf_factor_to_coordinate(), blf_var_axis_by_tag(), BLF_VARIATIONS_MAX, and FontBLF::variations.

◆ blf_glyph_set_variation_optical_size()

bool blf_glyph_set_variation_optical_size ( const FontBLF * font,
FT_Fixed coords[],
const float points )
static

Set the BLF_VARIATION_AXIS_OPTSIZE (Optical Size) axis to a specific size value.

Parameters
coordsArray of design coordinates, per axis.
pointsNon-zero size in typographic points.
Returns
success if able to set this value.

Definition at line 1120 of file blf_glyph.cc.

References blf_glyph_set_variation_float(), and BLF_VARIATION_AXIS_OPTSIZE.

Referenced by blf_glyph_render().

◆ blf_glyph_set_variation_slant()

float blf_glyph_set_variation_slant ( const FontBLF * font,
FT_Fixed coords[],
float current_degrees,
float target_degrees )
static

Set the BLF_VARIATION_AXIS_SLANT (Slant) axis to a specific slant value.

Parameters
coordsArray of design coordinates, per axis.
degreesSlant in clockwise (opposite to spec) degrees.
Returns
value set (could be clamped), or current slant if the axis does not exist.

Definition at line 1063 of file blf_glyph.cc.

References blf_glyph_set_variation_float(), and BLF_VARIATION_AXIS_SLANT.

Referenced by blf_glyph_render().

◆ blf_glyph_set_variation_spacing()

float blf_glyph_set_variation_spacing ( const FontBLF * font,
FT_Fixed coords[],
float current_spacing,
float target_spacing )
static

Set the proposed BLF_VARIATION_AXIS_SPACING (Spacing) axis to a specific value.

Parameters
coordsArray of design coordinates, per axis.
spacingGlyph spacing value. 0.0 is normal, as per spec.
Returns
value set (could be clamped), or current spacing if the axis does not exist.

Definition at line 1101 of file blf_glyph.cc.

References blf_glyph_set_variation_float(), and BLF_VARIATION_AXIS_SPACING.

Referenced by blf_glyph_render().

◆ blf_glyph_set_variation_weight()

float blf_glyph_set_variation_weight ( const FontBLF * font,
FT_Fixed coords[],
float current_weight,
float target_weight )
static

Set the BLF_VARIATION_AXIS_WEIGHT (Weight) axis to a specific weight value.

Parameters
coordsArray of design coordinates, per axis.
weightWeight class value (1-1000 allowed, 100-900 typical).
Returns
value set (could be clamped), or current weight if the axis does not exist.

Definition at line 1044 of file blf_glyph.cc.

References blf_glyph_set_variation_float(), and BLF_VARIATION_AXIS_WEIGHT.

Referenced by blf_glyph_render().

◆ blf_glyph_set_variation_width()

float blf_glyph_set_variation_width ( const FontBLF * font,
FT_Fixed coords[],
float current_width,
float target_width )
static

Set the BLF_VARIATION_AXIS_WIDTH (Width) axis to a specific width value.

Parameters
coordsArray of design coordinates, per axis.
widthGlyph width value. 1.0 is normal, as per spec (which uses percent).
Returns
value set (could be clamped), or current width if the axis does not exist.

Definition at line 1082 of file blf_glyph.cc.

References blf_glyph_set_variation_float(), and BLF_VARIATION_AXIS_WIDTH.

Referenced by blf_glyph_render().

◆ blf_glyph_to_curves()

void blf_glyph_to_curves ( const FT_Outline & ftoutline,
ListBase * nurbsbase,
const float scale )
static

from: http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-1

Vectorial representation of Freetype glyphs

The source format of outlines is a collection of closed paths called "contours". Each contour is made of a series of line segments and bezier arcs. Depending on the file format, these can be second-order or third-order polynomials. The former are also called quadratic or conic arcs, and they come from the TrueType format. The latter are called cubic arcs and mostly come from the Type1 format.

Each arc is described through a series of start, end and control points. Each point of the outline has a specific tag which indicates whether it is used to describe a line segment or an arc. The following rules are applied to decompose the contour's points into segments and arcs :

two successive "on" points indicate a line segment joining them.

one conic "off" point midst two "on" points indicates a conic bezier arc,

the "off" point being the control point, and the "on" ones the start and end points.

Two successive cubic "off" points midst two "on" points indicate a cubic bezier arc.

There must be exactly two cubic control points and two on points for each cubic arc (using a single cubic "off" point between two "on" points is forbidden, for example).

finally, two successive conic "off" points forces the rasterizer to create

(during the scan-line conversion process exclusively) a virtual "on" point midst them, at their exact middle. This greatly facilitates the definition of successive conic bezier arcs. Moreover, it's the way outlines are described in the TrueType specification.

Note that it is possible to mix conic and cubic arcs in a single contour, even though no current font driver produces such outlines.

                                  *            # on
                                               * off
                               __---__
  #-__                      _--       -_
      --__                _-            -
          --__           #               \
              --__                        #
                  -#
                           Two "on" points
   Two "on" points       and one "conic" point
                            between them
                *
  #            __      Two "on" points with two "conic"
   \          -  -     points between them. The point
    \        /    \    marked '0' is the middle of the
     -      0      \   "off" points, and is a 'virtual'
      -_  _-       #   "on" point where the curve passes.
        --             It does not appear in the point
                       list.
        *
        *                # on
                   *     * off
         __---__
      _--       -_
    _-            -
   #               \
                    #

     Two "on" points
   and two "cubic" point
      between them

Each glyphs original outline points are located on a grid of indivisible units. The points are stored in the font file as 16-bit integer grid coordinates, with the grid origin's being at (0, 0); they thus range from -16384 to 16383.

Convert conic to bezier arcs: Conic P0 P1 P2 Bezier B0 B1 B2 B3 B0=P0 B1=(P0+2*P1)/3 B2=(P2+2*P1)/3 B3=P2

Definition at line 1667 of file blf_glyph.cc.

References Nurb::bezt, BLI_addtail(), CU_BEZIER, CU_NURB_CYCLIC, dist_squared_to_line_v2(), eps, Nurb::flagu, float, BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_FREE, HD_VECT, l, len_squared_v2v2(), max_ff(), MEM_calloc_arrayN(), MEM_callocN(), MEM_freeN(), Nurb::pntsu, BezTriple::radius, Nurb::resolu, Nurb::type, and BezTriple::vec.

Referenced by blf_character_to_curves().

◆ blf_glyph_transform_monospace()

bool blf_glyph_transform_monospace ( FT_GlyphSlot glyph,
int width )
static

Transform glyph to fit nicely within a fixed column width. This conversion of a proportional font glyph into a monospaced glyph only occurs when a mono font does not contain a needed character and must get one from the fallback stack.

Definition at line 1224 of file blf_glyph.cc.

References float, and to_16dot16().

Referenced by blf_glyph_render().

◆ blf_glyph_transform_slant()

bool blf_glyph_transform_slant ( FT_GlyphSlot glyph,
float degrees )
static

Adjust the glyph's slant by a number of degrees. Used for fonts without BLF_VARIATION_AXIS_SLANT variable axis.

Parameters
degreesamount of tilt to add in clockwise degrees.

Definition at line 1167 of file blf_glyph.cc.

References degrees(), FontBLF::face, FontBLF::ft_size, to_16dot16(), and transform().

Referenced by blf_glyph_render().

◆ blf_glyph_transform_spacing()

bool blf_glyph_transform_spacing ( FT_GlyphSlot glyph,
float factor )
static

Adjust the glyph spacing by factor. Used for fonts without BLF_VARIATION_AXIS_SPACING variable axis.

Parameters
factor-1 (make tighter) <= 0 (normal) => 1 (add space).

Definition at line 1208 of file blf_glyph.cc.

References FontBLF::face, FontBLF::ft_size, and size().

Referenced by blf_glyph_render().

◆ blf_glyph_transform_weight()

bool blf_glyph_transform_weight ( FT_GlyphSlot glyph,
float width,
bool monospaced )
static

Adjust the glyph's weight by a factor. Used for fonts without BLF_VARIATION_AXIS_WEIGHT variable axis.

Parameters
width-500 (make thinner) <= 0 (normal) => 500 (add boldness).

Definition at line 1140 of file blf_glyph.cc.

References FontBLF::face, and FontBLF::ft_size.

Referenced by blf_glyph_render().

◆ blf_glyph_transform_width()

bool blf_glyph_transform_width ( FT_GlyphSlot glyph,
float factor )
static

Adjust the glyph width by factor. Used for fonts without BLF_VARIATION_AXIS_WIDTH variable axis.

Parameters
factor-1 (subtract width) <= 0 (normal) => 1 (add width).

Definition at line 1190 of file blf_glyph.cc.

References to_16dot16().

Referenced by blf_glyph_render().

◆ blf_glyphslot_ensure_outline()

FT_GlyphSlot blf_glyphslot_ensure_outline ( FontBLF * font,
uint charcode,
bool use_fallback )
static

◆ blf_texture_draw()

void blf_texture_draw ( const GlyphBLF * g,
const uchar color[4],
const FontShadowType shadow,
const int x1,
const int y1,
const int x2,
const int y2 )
static

◆ blf_var_axis_by_tag()

const FT_Var_Axis * blf_var_axis_by_tag ( const FT_MM_Var * variations,
const uint32_t tag,
int * r_axis_index )
static

Return a design axis that matches an identifying tag.

Parameters
variationsVariation descriptors from FT_Get_MM_Var.
tagAxis tag, e.g. BLF_VARIATION_AXIS_WEIGHT.
r_axis_indexreturns index of axis in variations array.

Definition at line 946 of file blf_glyph.cc.

References i.

Referenced by blf_glyph_set_variation_float(), and blf_glyph_set_variation_normalized().

◆ from_16dot16()

float from_16dot16 ( const FT_Fixed value)
static

Convert a floating point value to a FreeType 16.16 fixed point value.

Definition at line 75 of file blf_glyph.cc.

References float.

Referenced by blf_glyph_set_variation_float().

◆ to_16dot16()

FT_Fixed to_16dot16 ( const double val)
static

Convert a floating point value to a FreeType 16.16 fixed point value.

Definition at line 67 of file blf_glyph.cc.

Referenced by blf_glyph_set_variation_float(), blf_glyph_transform_monospace(), blf_glyph_transform_slant(), blf_glyph_transform_width(), and blf_glyphslot_ensure_outline().

Variable Documentation

◆ unicode_blocks

const UnicodeBlock unicode_blocks[]
static

Definition at line 463 of file blf_glyph.cc.

Referenced by blf_charcode_to_unicode_block().