Git Product home page Git Product logo

isabella232 / font-validator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from daltonmaag/font-validator

0.0 0.0 0.0 14.36 MB

Font Validator is a tool for testing fonts prior to release. This testing ensures that fonts meet Microsoft's high quality standards and perform exceptionally well on Microsoft's platform.

License: Other

C++ 0.07% C# 99.08% XSLT 0.29% CSS 0.01% Makefile 0.08% HTML 0.47%

font-validator's Introduction

Font-Validator

Font Validator is a tool for testing fonts prior to release. It was initially developed by Microsoft, to ensure that fonts meet Microsoft's high quality standards and perform exceptionally well on Microsoft's platform.

In 2015 the source code was published under the MIT license (see release discussion)

Usage

FontVal.exe is the GUI, and FontValidator.exe shows usage and example if run without arguments; both should be self-explanatory. Prepend with mono if runs on non-Windows systems.

The GUI's built-in help requires a CHM viewer, which defaults to chmsee on GNU+Linux, or via env variable MONO_HELP_VIEWER

The GUI on X11/mono needs the env variable MONO_WINFORMS_XIM_STYLE=disabled set to work around Bug 28047 - Forms on separare threads -- Fatal errors/crashes

Build Instructions

Font Validator was developed with Visual Studio C# by Microsoft; when it was released under MIT license in autumn 2015, VC# project files were not released. Instead, building with Mono's mcs C# compiler (http://www.mono-project.com/) was added. To build with mono instead of Microsoft C# simply run:

make

The usable binaries are then available from the bin directory.

If one is making major changes (adding new tests, or new error/warning codes):

make gendoc

(Plus a few extra manual steps.)

To delete the newly generated binaries:

make clean

As of Feb 2016, building with Microsoft Visual C# was partially re-implemented. See HinTak#8 for current status on this.

The rasterer-dependent tests (HDMX/LTSH/VDMX) requires an enhancement which first appears in FreeType 2.6.1. Linux users can use LD_LIBRARY_PATH env to load newer library than system's. Mac OS users should edit bin/SharpFont.dll.config. The bundled SharpFont.dll is patched with an equivalent 0001-adding-ComputeMetrics.patch. The bundled win64 FreeType dll was built with an additional win64-specific patch, freetype-win64.patch.

Currently the CHM Help file requires MS Help Workshop to build, so is bundled in the bin/ directory. fval.xsl is also rarely changed, so duplicated there.

SharpFont requires xbuild from monodevelop to build. https://github.com/Robmaister/SharpFont

Roadmap

Missing/broken Parts

Summary: 194 table tests, all work!

  • The 3 Rasterization Tests (BW, Grayscale, ClearType) requires a font scaler, and are not yet implemented via FreeType. See README-hybrid.txt for a work-around that uses Windows libraries to perform these tests.

  • The DSIG test (DSIG_VerifySignature) does not validate trusted certificate chain yet.

  • Viewing XML reports (and print, text search/select/copy therein) requires MSIE and Active X.

  • Many "Required field missing" in GenerateFValData/OurData.xml

  • Issues mentioned in "FDK/Technical Documentation/MSFontValidatorIssues.htm"

  • Many post-2nd (i.e. 2009) edition changes, such as CBLC/CBDT and other new tables.

See README-extra.txt for a list of other interesting or non-essential tasks.

Caveats

The 3 Rasterer-dependent metrics tests (LTSH/HDMX/VDMX) with a FreeType backend are known to behave somewhat differently compared to the MS Font Scaler backend. In particular:

HDMX: differ by up to two pixels (i.e. either side)

LTSH: FreeType backend shows a lot more non-linearity than an MS backend; the result with MS backend should be a sub-set of FreeType's, however.

VDMX: The newer code has a built-in 10% tolerance, so the newer FreeType backend result should be a sub-set of (the older) MS result. Also, note that MS 2003 binary seems to be wrong for non-square resolutions, so results differ by design.

On the other hand, the FreeType backend is up to 5x faster (assuming single-thread), and support CFF rastering. It is not known whether the MS backend is multi-threaded, but the FreeType backend is currently single-threaded.

Incomplete CFF checks:

val_CFF.cs   I.CFF_I_NotValidated
val_head.cs: I._TEST_I_NotForCFF head_MinMaxValues
val_hhea.cs: I._TEST_I_NotForCFF hhea_MinMax
val_OS2.cs:  I._TEST_I_NotForCFF OS/2_xAvgCharWidth

Annoyances

Table order is case-insensitive sorted in GUI, but case-sensitive sorted in output, both should be sorted consistently.

GUI allows in-memory reports, so CMD does not warn nor abort when output location is invalid, and wastes time producing no output. Only -report-dir aborts on that; no workaround to -report-in-font-dir nor temp dir yet.

font-validator's People

Contributors

hintak avatar davelab6 avatar msftgits avatar abdullahbell avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.