Skip to content

typerig.proxy.fl.objects.sampler.GlyphSampler

GlyphSampler

Glyph sampler for area analysis. Partially inspired by Huerta Tipografica Letterspacer (https://github.com/huertatipografica/HTLetterspacer)

Constructor: GlyphSampler() GlyphSampler(sample window, sample frequency)

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: ...

TODO: Italics - slat/deslat or slanted zones?!

Source bases

  • object (not resolved from selected source)

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, sample_window=[0, 1000], sample_frequency=20)
drawGlyphArea function (self, glyph, layer=None)
filterBandPass function (point_list, cutout_depth=(10000, 10000), in_reverse=False)
filterClosePoly function (point_list, in_reverse=False, grow_value=0)
getArea function (point_list)
getBounds function (point_list)
getContour function (point_list, get_fg_contour=False)
getRange function (self, quantized=False)
getSamples function (glyph, layer, sampling_range)
sampleGlyph function (self, glyph, layer=None, cache_data=True)
sampleGlyphArea function (self, glyph, layer=None, resample=False, cache_data=True)
updateRange function (self, sample_window=None, sample_frequency=None)