typerig.proxy.fl.objects.sampler.MetricSampler
MetricSampler
Metric sampler for automatically generating glyph side-bearings based on negative space area. Constructor: GlyphSampler(font (pFont))
Attributes: .data_samples (dict) -> {glyph_name:{layer:(left_samples, mid_samples, right_samples)}}: Cached data of Glyph samples .data_area (dict) -> {glyph_name:{layer:(left_area, mid_area, right_area)}}: Cached data of Glyph area regions
.sample_window (list/tuple) -> [min_y, max_y]: Window of scanning
.sample_frequency (int) : Sampling frequency
.sample_range range(window_min, window_max, sample_frequency): Sampling range
.sample_quantas list(int): Quantized sampling rage - the window is split in "sample_frequency" number of regions
.use_quantizer (bool): Use Quantized sampling range
.margin_growth (int): Grow margin outside the glyph BBoX
.cutout_x, .cutout_y: Cutout values defining how deep (x) or hight (y) the probing is done
Methods: .getGlyphSB(glyph (pGlyph), layer (Str), area_mult (Float), resample (Bool), draw (Bool))
Source bases
Inherited member index
Source-proven inherited members; local declarations override these entries.
drawGlyphArea— defined bytyperig.proxy.fl.objects.sampler.GlyphSampler.drawGlyphAreafilterBandPass— defined bytyperig.proxy.fl.objects.sampler.GlyphSampler.filterBandPassfilterClosePoly— defined bytyperig.proxy.fl.objects.sampler.GlyphSampler.filterClosePolygetArea— defined bytyperig.proxy.fl.objects.sampler.GlyphSampler.getAreagetBounds— defined bytyperig.proxy.fl.objects.sampler.GlyphSampler.getBoundsgetContour— defined bytyperig.proxy.fl.objects.sampler.GlyphSampler.getContourgetRange— defined bytyperig.proxy.fl.objects.sampler.GlyphSampler.getRangegetSamples— defined bytyperig.proxy.fl.objects.sampler.GlyphSampler.getSamplessampleGlyph— defined bytyperig.proxy.fl.objects.sampler.GlyphSampler.sampleGlyphsampleGlyphArea— defined bytyperig.proxy.fl.objects.sampler.GlyphSampler.sampleGlyphAreaupdateRange— defined bytyperig.proxy.fl.objects.sampler.GlyphSampler.updateRange
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
__init__ |
function | (self, p_font_object) |
|
getGlyphSB |
function | (self, glyph, layer=None, area_mult=0.5, resample=False, draw=False) |
|
getSB |
function | (area_tuple, area_mult, sample_window, x_height, font_upm) |