[Pkg-fonts-devel] Bug#635068: Lintian Wishlist: validiate .ttf/.otf font files to check for DRM bits (fsType != 0)

Paul Sladen debian at paul.sladen.org
Fri Jul 22 10:42:15 UTC 2011


Package: devscripts
Severity: Wishlist
X-Debbugs-CC: Debian Fonts Task Force <pkg-fonts-devel at lists.alioth.debian.org>

Based on the suggestion by Paul Wise on pkg-fonts, it would be useful
if Lintian were able to validate .ttf/.otf Truetype-based files and
issue warnings for those fonts that have DRM bits set.

The presence of such bits is designed to prevent the prevent full Free
use of the fonts; thread at:

  http://lists.alioth.debian.org/pipermail/pkg-fonts-devel/2011-July/thread.html#6916

The DRM bits ('OS/2'.fsType != 0) can restrict the user's freedom
by preventing activities such installing/embedding/printing/editing.

Catching these bits will allow informing upstream font developers that
their fonts have such restrictions and therefore encouraging upstream
authors to free their fonts further.  Many are simply aware, or have
been the victim of default export settings.

Proof that this is valuable and can generate results is at:

  "Technical: Metadata: set OS/2.fsType=0 (Installable Embedding)"
  https://bugs.launchpad.net/ubuntu-font-family/+bug/648406

Indeed, such a check proved so useful have it was added to the build
process for the Ubuntu Font Family, causing an error condition and
bailing out if required.  For Lintian the check can simply be a
warning, or perhaps a error condition for fonts entering 'main'.  
Example GPLv3 Python/fonttools code to check can be found at:

  http://bazaar.launchpad.net/~sladen/ubuntu-font-family/midstream/view/head:/midstream/validate-libre-ttf.py

and for resetting the DRM bits:

  http://bazaar.launchpad.net/~sladen/ubuntu-font-family/midstream/view/head:/midstream/patch-truetype.py --remove-drm

Paul Wise notes that something can probably be done with existing
Perl-based font libaries too.  Full documentation on the
Truetype/Opentype file format and the meaning of the 'fsType' DRM
flags can—and the GUI interface in Fontforge to change them—can be
found at:

  http://partners.adobe.com/public/developer/opentype/index_os2.html#fst
  http://fontforge.sourceforge.net/fontinfo.html#TTF-Values







More information about the Pkg-fonts-devel mailing list