[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] python_freetype Design: Vector & Matrix Operations
From: |
Werner LEMBERG |
Subject: |
Re: [ft] python_freetype Design: Vector & Matrix Operations |
Date: |
Sun, 15 Feb 2015 07:47:59 +0100 (CET) |
> I’ve been wondering why FreeType uses only 2×2 matrices, so it has to
> express translations with a separate vector.
This is by design, because...
> It is common in graphics libraries to use homogeneous matrices (3×3
> for 2D, 4×4 for 3D) so all linear transformations can be
> encapsulated in a single matrix.
... FreeType isn't a graphics library per se.
> I know FreeType can’t handle non-affine transformations—presumably
> that is by design. But you could do what PostScript did, and have a 3×2
> matrix that can only express affine transformations.
Shifting glyphs is *much* more common than rotating or shearing.
Werner