Skip to content

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 by typerig.proxy.fl.objects.sampler.GlyphSampler.drawGlyphArea
  • filterBandPass — defined by typerig.proxy.fl.objects.sampler.GlyphSampler.filterBandPass
  • filterClosePoly — defined by typerig.proxy.fl.objects.sampler.GlyphSampler.filterClosePoly
  • getArea — defined by typerig.proxy.fl.objects.sampler.GlyphSampler.getArea
  • getBounds — defined by typerig.proxy.fl.objects.sampler.GlyphSampler.getBounds
  • getContour — defined by typerig.proxy.fl.objects.sampler.GlyphSampler.getContour
  • getRange — defined by typerig.proxy.fl.objects.sampler.GlyphSampler.getRange
  • getSamples — defined by typerig.proxy.fl.objects.sampler.GlyphSampler.getSamples
  • sampleGlyph — defined by typerig.proxy.fl.objects.sampler.GlyphSampler.sampleGlyph
  • sampleGlyphArea — defined by typerig.proxy.fl.objects.sampler.GlyphSampler.sampleGlyphArea
  • updateRange — defined by typerig.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)