freetypy.Face.request_size

Face.request_size()

Resize the scale of the active Size object in a face.

Parameters:
  • type (size request constant) – The size request type. See SIZE_REQUEST_TYPE for the available constants.
  • width (float, optional) – The desired width.
  • height (float, optional) – The desired height.
  • horiResolution (int, optional) – The horizontal resolution. If set to zero, width is treated as a fractional pixel value.
  • vertResolution (int, optional) – The vertical resolution. If set to zero, height is treated as a fractional pixel value.

Notes

If width is zero, then the horizontal scaling value is set equal to the vertical scaling value, and vice versa.

Although drivers may select the bitmap strike matching the request, you should not rely on this if you intend to select a particular bitmap strike. Use select_size instead in that case.

The relation between the requested size and the resulting glyph size is dependent entirely on how the size is defined in the source face. The font designer chooses the final size of each glyph relative to this size. For more information refer to http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html.

See Size_Metrics for how size requesting relates to scaling values.