public bool TryGetPosition(OpenTypeMetricsTag metricsTag, out int position) { fixed(int *p = &position) { return(HarfBuzzApi.hb_ot_metrics_get_position(font.Handle, metricsTag, p)); } }
public void ShouldGetOpenTypeMetrics(OpenTypeMetricsTag tag, int expected) { using (var face = new Face(Blob, 0)) using (var font = new Font(face)) { var result = font.OpenTypeMetrics.TryGetPosition(tag, out var position); Assert.True(result); Assert.Equal(expected, position); } }
public int GetYVariation(OpenTypeMetricsTag metricsTag) => HarfBuzzApi.hb_ot_metrics_get_y_variation(font.Handle, metricsTag);
public extern static hb_position_t hb_ot_metrics_get_y_variation(hb_font_t font, OpenTypeMetricsTag metrics_tag);
public extern static float hb_ot_metrics_get_variation(hb_font_t font, OpenTypeMetricsTag metrics_tag);
public extern static hb_bool_t hb_ot_metrics_get_position(hb_font_t font, OpenTypeMetricsTag metrics_tag, out hb_position_t position /* OUT. May be NULL. */);