Giter VIP home page Giter VIP logo

hintak / font-validator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/font-validator

145.0 145.0 11.0 219.11 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# 98.82% XSLT 0.29% HTML 0.51% Makefile 0.09% C++ 0.19% CSS 0.01% C 0.01% Python 0.09%

font-validator's People

Contributors

aaronbell avatar abdullahbell avatar camertron avatar davelab6 avatar devosb avatar hintak avatar microsoft-github-policy-service[bot] avatar miguelsousa avatar moyogo avatar msftgits avatar pomax avatar robmck-ms avatar schriftgestalt avatar threeseat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

font-validator's Issues

build issue on Xenial

on Ubuntu xenial (with mono-mcs 4.2.1.102+dfsg2-7ubuntu4) I've beem getting these build errors against current master:

$ make
mkdir -p bin
for target in Compat OTFontFile Compat.2nd ValCommon GMath Glyph OTFontFileVal; do
make bin/${target}.dll ;
done
make[1]: Entering directory '/home/nico/repos/fontval-ht'
( cd Compat &&
mcs -debug- -optimize+ -target:library -lib:../bin/ -r:SharpFont -r:System.Windows.Forms -out:../bin/Compat.dll *.cs )
error CS0006: Metadata file SharpFont' could not be found Compilation failed: 1 error(s), 0 warnings Makefile:98: recipe for target 'bin/Compat.dll' failed make[1]: *** [bin/Compat.dll] Error 1 make[1]: Leaving directory '/home/nico/repos/fontval-ht' make[1]: Entering directory '/home/nico/repos/fontval-ht' ( cd OTFontFile && \ mcs -debug- -optimize+ -target:library -out:../bin/OTFontFile.dll *.cs ) Table_CFF.cs(356,41): warning CS0162: Unreachable code detected Table_CFF.cs(387,33): warning CS0162: Unreachable code detected Table_CFF.cs(398,32): warning CS0219: The variable op' is assigned but its value is never used
Table_CFF.cs(402,37): warning CS0219: The variable sidversion' is assigned but its value is never used Table_CFF.cs(406,37): warning CS0219: The variable sidNotice' is assigned but its value is never used
Table_CFF.cs(414,37): warning CS0219: The variable sidFamilyName' is assigned but its value is never used Table_CFF.cs(418,37): warning CS0219: The variable sidWeight' is assigned but its value is never used
Table_CFF.cs(457,45): warning CS0219: The variable sidCopyright' is assigned but its value is never used Table_CFF.cs(518,48): warning CS0219: The variable oCIDFontVersion' is assigned but its value is never used
Table_CFF.cs(567,32): warning CS0219: The variable op' is assigned but its value is never used Table_EBLC.cs(1217,39): warning CS0219: The variable ic' is assigned but its value is never used
Table_OS2.cs(943,28): warning CS0219: The variable fourByte' is assigned but its value is never used Table_Zapf.cs(340,18): warning CS0414: The private field OTFontFile.Table_Zapf.FeatureInfo.m_offsetFeatureInfo' is assigned but its value is never used
Table_Zapf.cs(341,23): warning CS0414: The private field OTFontFile.Table_Zapf.FeatureInfo.m_bufTable' is assigned but its value is never used Compilation succeeded - 14 warning(s) make[1]: Leaving directory '/home/nico/repos/fontval-ht' make[1]: Entering directory '/home/nico/repos/fontval-ht' ( cd Compat.2nd && \ mcs -debug- -optimize+ -target:library -lib:../bin/ \ -r:SharpFont -r:System.Windows.Forms \ -r:System.Security \ -r:OTFontFile \ -out:../bin/Compat.dll *.cs \ ../DSIGInfo/DSIGInfo.cs \ ../mcs-class-Mono.Security/ASN1.cs \ ../mcs-class-Mono.Security/ASN1Convert.cs \ ../Compat/*.cs ) error CS0006: Metadata file SharpFont' could not be found
Compilation failed: 1 error(s), 0 warnings
Makefile:103: recipe for target 'bin/Compat.2nd.dll' failed
make[1]: *** [bin/Compat.2nd.dll] Error 1
make[1]: Leaving directory '/home/nico/repos/fontval-ht'
make[1]: Entering directory '/home/nico/repos/fontval-ht'
( cd ValCommon &&
mcs -debug- -optimize+ -lib:../bin/ -r:OTFontFile -target:library -out:../bin/ValCommon.dll *.cs )
DICondBuilder.cs(39,47): warning CS0219: The variable infoPars' is assigned but its value is never used Compilation succeeded - 1 warning(s) make[1]: Leaving directory '/home/nico/repos/fontval-ht' make[1]: Entering directory '/home/nico/repos/fontval-ht' ( cd GMath && \ mcs -debug- -optimize+ -lib:../bin/ -r:OTFontFile -r:ValCommon -target:library -out:../bin/GMath.dll *.cs ) Bez2D.cs(589,13): warning CS0162: Unreachable code detected Compilation succeeded - 1 warning(s) make[1]: Leaving directory '/home/nico/repos/fontval-ht' make[1]: Entering directory '/home/nico/repos/fontval-ht' ( cd Glyph && \ mcs -debug- -optimize+ -lib:../bin/ -r:OTFontFile -r:ValCommon -r:GMath \ -resource:NS_Glyph.GErrStrings.resources \ -target:library -out:../bin/Glyph.dll *.cs ) Glyph.cs(1092,36): warning CS0219: The variable linters' is assigned but its value is never used
Glyph.cs(1250,17): warning CS0219: The variable ind' is assigned but its value is never used Compilation succeeded - 2 warning(s) make[1]: Leaving directory '/home/nico/repos/fontval-ht' make[1]: Entering directory '/home/nico/repos/fontval-ht' ( cd OTFontFileVal && \ mcs -debug- -optimize+ -lib:../bin/ \ -r:Compat -r:System.Windows.Forms \ -r:OTFontFile -r:ValCommon -r:Glyph -r:GMath \ -resource:OTFontFileVal.ValStrings.resources \ -target:library -out:../bin/OTFontFileVal.dll *.cs ) error CS0006: Metadata file Compat' could not be found
Compilation failed: 1 error(s), 0 warnings
Makefile:148: recipe for target 'bin/OTFontFileVal.dll' failed
make[1]: *** [bin/OTFontFileVal.dll] Error 1
make[1]: Leaving directory '/home/nico/repos/fontval-ht'
Makefile:76: recipe for target 'default' failed
make: *** [default] Error 2

Any tips on what's missing or what I'm doing wrong? Thanks !

On Ubuntu bionic (the next LTS with mono-mcs 4.6.2.7+dfsg-1ubuntu1), it looks like the build does not show the errors but we're still using xenial for various things and would like to do so for a good while longer.

misc issues ftom Jose at DaltonMaag

General Information
W0022 Recommended table is missing
We expect kern table missing because we don’t keep it unless the client specifically ask for it. It is a table that stores ‘old-style’ kerning information, not class kerning. The class kerning we use is stored in the GPOS table.
hdmx and LTSH tables won't be present in fonts that don’t have hinting instructions on the horizontal (x) axis.

I would add that these are not defined as recommended tables in the OT Spec, so calling them recommended is inaccurate.

GSUB
W5300 The FeatureRecord tag is valid, but unregistered
We expect this warning whenever in the font we use features that are not recognised by Font Validator. FV understands that the tag is valid but it doesn’t know what it is because its database has not been updated to the latest list of features available.
Tags commonly claimed as not registered: ssXX (where XX is the number of the Stylistic Set)

OS/2
E2132 The version number is invalid

OS/2 table version 4 is a valid version number in the latest OTspec, so Font Validator should be able to recognize it as valid.
E2127 The table length does not match the expected length for this version
With our latest policy about vertical metrics, we use OS/2 table version 4. This is not recognised by FV and we expect errors that affect further tests on the table (Error code W0051).
E2135 The xAvgCharWidth field does not equal the calculated value
Font Validator doesn't know how to calculate this value for OS/2 table version 4, where the method for calculating it has been changed.
E2101 There are undefined bits set in fsSelection field
This error is related to the usage of Bit 7 in the fsSelection (useTypoMetrics), that in older versions of the table (v3 and below) was not in use and it was supposed to be set on 0. Since this is now supported, it should be something Font Validator should support and check correctly.

gasp
E1003 The version number is not 0
E1000 Some rangeGaspBehavior fields contain invalid flags
We always expect these two errors because Font Validator doesn’t recognize the new version of the gasp table which contains ClearType fields.

hhea
W1402 Descender should be greater than or equal to head.yMin
Prescribing how vertical metrics should be calculated shouldn't be part of what Font Validator does, since there a multiple strategies and they can change from project to project, making FV suggestions invalid. This comment is valid for any other warning that involve vertical metrics.

loca
W1701 Loca references a glyf entry which length is not a multiple of 4
E1703 Loca entry points outside the glyf range
This happens when the last glyph in the font doesn’t have outlines. It’s a minor issue and seems to have no importance nowadays, so perhaps it may be fine to get rid of it? To investigate.

maxp
W1900 The value doesn’t match the calculated value
I think for this one, the way the value is calculated by different tools varies. I add it just to encourage double-checking this against the OTspec. To investigate what the correct way to calculate this is.

turn info for missing name id records ids 1 through 6 into a warning?

The code currently signals missing name records 3 and 6 with an "info" highlight, whereas these should probably be "warning" highlights: while not in error according to the spec, fonts with name records in the 1 through 6 range missing, will absolutely fail when users try to actually make them available for typesetting due to never-mentioned hard requirements on name strings in the various operating systems.

Windows has a hard requirement for ids 3 and 6, and MacOS has the additional hard requirement for 4 and 5; In addition, everything needs 1 and 2, so marking string ids 1 through 6 as a warning would help with making sure fonts are deployment-ready.

DSIG remaining issues.

Besides verifying the data against the signed hash, I can now also:

  • read the signing time stamp
  • joining the trusted chain.
  • establish about 60% of the fonts being signed by a certificate issued by a root authority, or a proxy of one; using just the thumb prints (i.e. digest) of the 19 certificates shipped by win 8.1. In fact I think I only need about 5. This covers most recent fonts from Vista onwards.

There is a bit more work to do to check timestamp is within certificates' validity period etc. Just tedious but straightforward. These are considerable more informative than the official MS tool check, and covers older fonts already.

However, the signing timestamp code is windows-only ( mono bug: https://bugzilla.xamarin.com/show_bug.cgi?id=36295 ), the trusted chain codes uses a lot of Mono-specific certificate manipulation code and is non-windows-only; and to establish trust of the older 40% of signed fonts I need to include more trusted thumb prints, or at worst, maybe even the (older) root certificates themselves.

So between windows-only, non-windows-only, and more bundled certificates - all 3 means importing lots of non-mine code or data (the windows-only problem means fix the bug and bundle the fixed Mono code, the non-windows-only problem means bundling the non-windows part of Mono code...).

To build the non-windows trusted chain code, do 'make USE_MONO_SECURITY=true' instead of plain make.

a few complaints /comments from Khaled Hosny

Look into these at some point, from googlefonts/ufo2ft#195 (comment) , duplicated here:

E | E2101 | There are undefined bits set in fsSelection field
Bit(s) 7

(complaining about USE_TYPO_METRICS bit, in the spec since 2008).

or

E | E5400 | The FeatureParams field is not null
FeatureList, FeatureRecord27, FeatureTable

(non-null is allowed in the spec since 2000)

or

E | E5700 | The LookupFlag reserved bits are not all set to zero
LookupList, Lookup[29]

(complaining about useMarkFilteringSet bit, in the spec since 2010)

Spurious E5700 when Mark Sets are used

Every lookup using Mark Sets produces an error E5700:
The LookupFlag reserved bits are not all set to zero

It would be very helpful to check the consistency of Mark Sets however. At least:

LookupFlag bit field

  •     useMarkFilteringSet (0x0010)
    

If set, it must check that

  •     the LookupHeader includes a MarkFilteringSet
    
  •     a MarkGlyphSetsTable is present in the GDEF table
    

Further, the Mark Glyph Sets consistency should be checked:

  •     markGlyphSetTableFormat must be 1
    
  •     markGlyphSetCount should be bigger than 0
    

Each coverage table in coverageOffsets should be checked for consistency:

  •     Each glyph in the table must be present in the font.
    

implements E6007|W6007|E6049

w7fonts/alger.ttf:0:E   | E6049 | Twilight zone point not set 
w7fonts/baskvill.ttf:0:E    | E6049 | Twilight zone point not set 
w7fonts/bauhs93.ttf:0:E | E6049 | Twilight zone point not set 
w7fonts/britanic.ttf:0:E    | E6049 | Twilight zone point not set 
w7fonts/harlowsi.ttf:0:E    | E6049 | Twilight zone point not set 
w7fonts/latinwd.ttf:0:E | E6049 | Twilight zone point not set 
w7fonts/playbill.ttf:0:E    | E6049 | Twilight zone point not set 
w7fonts/stencil.ttf:0:E | E6049 | Twilight zone point not set 
w7fonts/vivaldii.ttf:0:E    | E6049 | Twilight zone point not set 
WIN-FONTS/win2k3/artro.ttf:0:E  | E6007 | EIF found without IF 
WIN-FONTS/win2k3/simpo.ttf:0:E  | E6007 | EIF found without IF 

and

2012-05/Library/Fonts/Hoefler Text.ttc:0:W  | W6007 | Loop variable not 1 at end of program. This means it was set but not used 
2012-05/Library/Fonts/RaananaBold.ttf:0:E   | E6049 | Twilight zone point not set 
2012-05/Library/Fonts/Raanana.ttf:0:E   | E6049 | Twilight zone point not set 
2012-05/System/Library/Fonts/Apple Symbols.ttf:0:E  | E6049 | Twilight zone point not set 
2014-10_10.9.5/System/Library/Fonts/Apple Symbols.ttf:0:E   | E6049 | Twilight zone point not set 
Library/Application Support/Apple/Fonts/Deprecated/Hei.ttf:0:E  | E6049 | Twilight zone point not set 
Library/Application Support/Apple/Fonts/Deprecated/Kai.ttf:0:E  | E6049 | Twilight zone point not set 
Library/Fonts/Hoefler Text.ttc:0:W  | W6007 | Loop variable not 1 at end of program. This means it was set but not used 
Library/Fonts/Raanana.ttc:0:E   | E6049 | Twilight zone point not set 
Library/Fonts/Raanana.ttc:1:E   | E6049 | Twilight zone point not set 
System/Library/Fonts/Apple Symbols.ttc:0:E  | E6049 | Twilight zone point not set 

build issue on Ubuntu Xenial

on Ubuntu xenial (with mono-mcs 4.2.1.102+dfsg2-7ubuntu4) I'm getting these build errors:

make[1]: Leaving directory '/home/nico/repos/fontval-ht'
make[1]: Entering directory '/home/nico/repos/fontval-ht'
( cd OTFontFileVal &&
mcs -debug- -optimize+ -lib:../bin/
-r:Compat -r:System.Windows.Forms
-r:OTFontFile -r:ValCommon -r:Glyph -r:GMath
-resource:OTFontFileVal.ValStrings.resources
-target:library -out:../bin/OTFontFileVal.dll *.cs )
ValDriver.cs(92,41): warning CS0168: The variable e' is declared but never used ValDriver.cs(310,20): warning CS0219: The variable sTable' is assigned but its value is never used
val_CFF.cs(115,25): warning CS0219: The variable name' is assigned but its value is never used val_CFF.cs(128,25): warning CS0219: The variable a' is assigned but its value is never used
val_VDMX.cs(139,32): warning CS0219: The variable ratio' is assigned but its value is never used val_cmap.cs(645,32): warning CS0219: The variable charbuf' is assigned but its value is never used
val_hhea.cs(394,28): warning CS0219: The variable dItalicAngle' is assigned but its value is never used val_post.cs(74,49): error CS0117: OTFontFileVal.W' does not contain a definition for post_W_Version_3_Apple' atoms.cs(5,17): (Location of the symbol related to previous error) val_post.cs(78,49): error CS0117: OTFontFileVal.W' does not contain a definition for `post_W_Version_4_Apple'
atoms.cs(5,17): (Location of the symbol related to previous error)
Compilation failed: 2 error(s), 7 warnings
Makefile:145: recipe for target 'bin/OTFontFileVal.dll' failed
make[1]: *** [bin/OTFontFileVal.dll] Error 1
make[1]: Leaving directory '/home/nico/repos/fontval-ht'
Makefile:73: recipe for target 'default' failed
make: *** [default] Error 2

Thanks for any insights.

Let me know how I can help with this.

adding skeleton build instruction

Moving the build instruction section to wiki does have a slight problem that a git clone does not come with build instruction anymore. In any case, the wiki have other misc build-related info, and probably shouldn't be in the code. Need re-adding brief build instruction plus pointer to wiki for more info

Warning W1113 does not divulge which glyph has degenerated contours

One of our fonts triggers this: W1113 Degenerated contour(s), Number of glyphs with the warning = 1. I guess the code to find these contours is at https://github.com/HinTak/Font-Validator/blob/master/Glyph/GErr.cs#L980, however:

  1. I don't understand what the code does
  2. It doesn't seem to use indGlyphOwner to note down the specific glyph index

I'd prepare a patch to fix 2., but the specifics string doesn't even seem to be used in the report?!

OS/2: "The version number is valid, but less than 5" [W2106]

I'd recommend to downgrade this warning message to informative status.
I think it's perfectly fine to have OS/2 table version less than the current one (version 5), as long as one does not attempt to use any of the flags which are only defined in subsequent versions of the table.

false E2113 for high Unicode

E2113
A unicode range was indicated in ulUnicodeRange, but the font has no characters in that range
No 'Gothic' characters are present

Yet the font does have a full set of characters in the Gothic range.

This is observed when ulUnicodeRange is set for certian other ranges as well.

Perhaps the problem might be triggered by the Gothic range being beyond U+10000.
Or perhaps a list of ranges is out of date.

SVG further work

validation based on a cached DTD or other similar mechanism (network access much not be required, nor on-the-fly fetch from w3c)

checking cross-references against CPAL.

A very distant plan may be to try rendering and catches rendering errors, in the same way one does in the rasterization tests for truetype fonts.

Spurious warning "The leftSideBearing is greater than the advance width (unlikely value)"

First, in the "details" field, it reports a "glyph #". It would be much more helpful for font developers to report the font slot number.

The bug is, it complains about zero-width mark glyphs, such as Hebrew hataf segol. If the Unicode data says the glyph is a nonspacing mark (Mn), I think the check should be different -- perhaps it should check that the advance width is 0.

How do you build for MacOS?

The documentation says running make will generate the correct executables, but the only one I see in bin/ is FontValidator.exe, which refuses to run on MacOS. I've looked through the Makefile and it doesn't look like there's any code to build for MacOS, yet a binary package exists for Mac. How do I re-generate the package? Note: I'm talking about the command-line tool only, I don't care about the GUI at the moment.

Tables hdmx, VDMX, LTSH calculated by CacheTT.exe considered incorrect by FontVal

  1. cd /tmp && git clone --depth 1 https://github.com/daltonmaag/ubuntu.git && cd ubuntu && make # Install wine and curl first
  2. FontValidator.exe -file build/Ubuntu-R.ttf

FontVal will disagree on almost all entries of the hdmx, VDMX, LTSH tables, which have been calculated by CacheTT.exe. Not sure if FontVal or CacheTT are more correct?

DSIGInfo crash

I’m trying to add a DSIG table to fonts using the OpenSSL S/MIME signature functions and thought that DSIGInfo could help me debug the signing process.

So far I managed to crash DSIGInfo when trying to display the info from the signed font (attached). It crashes directly after listing the certificates’ (2 in this example) common names.

The message is:

Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
    at Mono.Security.ASN1..ctor(Byte[] data)
    at Compat.DSIGInfo.Main(String[] args)

My DSIG table may well be faulty, but maybe you want to look into the crash and fix it :)

DSIGTestFont.zip

Window 64-bit freetype backend buggy?

Got a report which crashes only with some fonts, but successful if the freetype-based tests are switched off. This suggests a freetype backend problem. However the 32-bit build works on wine so likely

  • affect only some fonts
  • specific to 64-bit windows

Way to test is to switch off the 4 freetype-based tests (hdmx, vdmx, ltsh, rasterisation), to see if it stops the crashing, or use the special x86 mode only binary in https://sourceforge.net/projects/hp-pxl-jetready/files/Microsoft%20Font%20Validator/misc/FontVal-2.1.0-py-bin-net4-x86.zip/download

Cc @DunwichType

Light-weight direct harness to rasterization backend

Would be useful to have a light(er) weight harness to the rasterization backend for easier comparison with the 1.0 backend.

This means bypassing all the preliminary opentype table checks, as we really want to be able to let really buggy fonts hit the backend.

flint's relationship with FontVal

Just noticed flint from Microsoft which seems to do similar thing. May be useful to know if FontVal derives from it, or differences.

FontVal should print glyph name, not just index, when complaining about something

I'm hitting multiple errors in the Ubuntu font and FontVal likes to tell me which index the offending glyph or kern table pair has. I then have to dive into fontTools in a Python REPL to find out which glyph name that index maps to. I'd find it easier if FontVal told me directly. This concerns all tests that report on single glyphs, e.g. the hdmx, VDMX, LTSH, kern and glyf tests.

XML report viewer

See also the notes on the hybrid branch.

The XML report viewer code was removed and not opened. In any case, it is MS IE- and ActiveX- dependent and windows-only. While the hybrid branch works well enough, matters on non-windows needs to be dealt with at some point.

Mono provides a System.WebBrowser implementation; it may be sufficient if it works... apparently it depends on iibgluezilla (bridge library to mozilla's gecko/xulrunner library) which has not been maintained for a while.

The Mono community seems to be focusing on webkit-sharp (c# binding for webkit - Mac OS Safari's html rendering library, derived from khtml, the KDE's html rendering library) or GTK#, so those might be where further development of the XML report viewer might go.

head table error

When I try to validate the head table of a non-Apple font, I obtain an error:
"Error: Input string was not in a correct format". An XML report (.report.xml) file is generated, but not the HTML one (.report.html). I have no error with the head table unchecked.

Tested with many Google fonts like
https://github.com/JulietaUla/Montserrat/blob/master/fonts/ttf/Montserrat-Regular.ttf

Tested with Calibri Regular (Calibri.ttf), version 6.20 (Windows 10 Fall Creator Update).

Tested with Minion Pro Regular (MinionPro-Regular.otf), version 2.112.

On the contrary, TTF files from Apple (Apple Chancery.ttf, Zapfino.ttf) are fine.

Tested with Mac.OS.X.FontValGUI-Seifert-2.1.1.zip

Build issue on Ubuntu WSL

See also #37

There are a number of issues about building on Ubuntu WSL. Partly it is due to Ubuntu shipping a rather substantially outdated mono. (#37 ).

Partly it is because the current build process depends on overwriting Compat.dll a few times (sort of an incremental build, to cope with circular dependencies). File system caching on WSL seems not to like it.

Note to self.

re-implementing a MS Visual Studio/C# (express?) based build system.

Microsoft stripped away the build system before releasing the code bundle. Seeing as most of the users are windows users, it is probably a good idea to re-implement a build system with microsoft visual studio/visual c# express.

Mono's mcs compiler is mostly compatible with microsoft's csc C# compiler, option-wise, from past experience. There are subtle differences like "-define" (open-/unix- style) vs "/define" (MS style), "/" vs "" for file and directory paths, and for "/reference:", mcs takes names without the dll suffix, csc wants the dll suffix. But on the whole, all the options have their equivalences, adapting to some difference between open- and MS style practices.

I have done this before in the past - mostly when I wrote valid c# code and and mcs did not like it, and went and did it with csc, then filed bug report with the mono folks ("hey, it works with csc and not with mcs!"). Mot of these got fixed eventually - and such issues got rarer and rarer over time.

Monodevelop's xbuild can process visual studio *.csproj and *.sln files (project and solution files) so that should be straight-forward and the easy part. Converting the command line options is the hard part, outlined above.

Again this is just lack of time/priority.

NuGet and / or chocolatey packages

And automatic packages publishing after build on master on build server...

This is best way for using Font-Validator within tests for other projects...

FreeType backend enhancement for Rasterization tests

The code for the MS font renderer was removed and not opened. In any case, it (at least the 2003 version) chokes on about 10% of Mac OS X shipped fonts, so the situation is begging for an update and replacement.

Basic interaction is already established with a FreeType backend for HDMX/LTSH/VDMX tests. The MS font renderer is capable of detecting about 60 errors and 14 warnings for glyph byte-code instructions.

FreeType is currently only capable of detecting only a subset of these, and also only under debug conditions. There is further work to make FreeType detecting a bigger proportion of these, and also some API change/addition to obtain that information in a normal release build.

See also the notes on the hybrid branch.

License confirmation

Hin Tak, please could you clarify what license the binary-only software in this repo (e.g. freetype shared library files) are available under?

err with GDEF version number

it reports an error:
GDEF: E4012 The version number is not 0x00010000 Detail:0x00010002

The spec says:

The format 0x00010002 of the GDEF header contains an additional Offset to a list defining mark glyph set definitions (MarkGlyphSetDef):

Related to that, it reports errors about wrong lookup flags that are linked to mark filtering.

Native Mac OS X standalone executable

Mono has an architecture with a tool called mkbundle which in effect statically linking and bundle a small mono runtime with the .net dll/exe's to make a standalone executable.

I have used that on linux before, and successfully; the process is the same with mac os X. The disappointing thing is that there is no noticeable performance gain (what I was after), and also (1) the system libraries of the typical linux systems are too varied, and even standalone binaries don't transplant well between different linux distributions, (2) I was working on proprietary dll/exe's and distributing the outcome of proprietary dll/exe's statically linked with MIT-licensed mono runtime is legally dubious.

Neither of these applies with Font Validator on Mac OS X - Mac OS X's system API is far more stable between OS versions, and the license is compatible.

Just due to lack of time and motivation/priority, really.

E4100 AnchorFormat field is invalid -- can't tell what the problem is

Hi,

I do not know if this is a Font-Validator issue, a FontForge issue, or something else.
In builds of FreeFont, hundreds of complaints like:

E4100 The AnchorFormat field is invalid LookupList, Lookup[23], SubTable0(MarkBasePos), BaseArray, BaseRecord[52], BaseAnchor[1], AnchorFormat = 241

I look at the entry using FontForge, but I'm not sure what I'm looking for. What is "invalid" about it?

further feedbacks from Paul Wise

Many of the further feedbacks from @pabs3 via e-mail are specific to my repo, so I am posting them here. In general, issues applicable to upstream should be filed upstream, like the original thread ( microsoft#16 ).

Please include years in your Copyright lines.

When you make commits, *always* write a detailed explanation of why you
are making the change.

When you make commits, always do one logical change per commit, don't
mix up multiple different changes into one commit.

Especially don't make whitespace and other changes in the same commit.

Please come up with a proper version scheme (like SemVer).

http://semver.org/

Tags should be named font-validator-1.2.3.4 (name-version).

Don't copy in code that is maintained elsewhere.

Don't commit binary or generated files to git, including PDF, CHM etc.
Instead commit the source code for them and the autobuild instructions.
For example the ReadMeFirst_MacOSX.pdf has been produced from LaTeX.
Your version of Font-Validator cannot be added to Debian due to this.

Don't commit patches to git, instead send them upstream.

Your distribution of FreeType without distributing source code is a
license violation, please do not do that. I strongly recommend
rewriting your git history to drop all commits to bin/ and the freetype
patch too.

Having two build systems in one project is a bad idea, I would suggest
dropping one of them and keeping the one that is cross-platform.

Why not Compat.2nd and not put things in Compat?

The -quiet option still prints filenames before printing warnings.

When parts of the code have been automatically derived from specs, put
that process in the Makefile so it can be repeated. I would also remove
it from the git repo and make running it a part of the release process.
Otherwise the code is guaranteed to get out of date with the spec.

When pointing out bugs in other tools like Xamarin in the commit log,
give a direct link to the bug report you are talking about.

Many of your commits have amazingly long changelog entries, this is a
sign that they should be split up into smaller commits.

An option to put the reports in the current dir might be useful.

Never ever do stuff like Compat/Xsl.cs, that is ridiculous.

Why do you embed signatures of Windows certs in the code??

What is README-hybrid.txt and why does it have commits in it??

If the project is going to grow more binaries with generic names, they
need to have a prefix on them otherwise they could conflict with names
used by other projects at some point in time.

I'm not sure the repo is the best place to be storing slides for
presentations, I would put those elsewhere.

Cut-and-paste typos are a sign that code needs to be refactored.

base64 encoded binary files inside text files is horrible, is there any
way for resx files to instead reference external binary files?

Please sign your tags and pushes with OpenPGP:

http://mikegerwitz.com/papers/git-horror-story
https://help.riseup.net/en/security/message-security/openpgp/best-practices

Please read Debian's upstream guide:

https://wiki.debian.org/UpstreamGuide

here is part of my response - I see there is an item about write access/CLA in response to a large paragraph from Paul, which I did not include above:

- I don't think Microsoft will ever allow non-employees write access to upstream, even if they can get rid of the CLA (which is also unlikely). For my part, I won't allow write access to mine either - what happens in my repo I am responsible for, and I will review every change that goes in. But I will consider pulls, or cheery-picks. I was not prepared to take whole-sale cosmetic changes ( https://github.com/HinTak/Font-Validator/pull/1#issuecomment-156547330 ) not because I don't agree, but because it takes time to review that they are truly cosmetic.

- when I first put my branch out there, it was organized to cherry-pick implemented features from - i.e. inter-dependent commits collapsed into one. I was not expecting people to adopt it whole-sale; and to some extent, this is still the case: you want some features, there is a minimal number of commits you can cherry-pick from mine (and maybe implement some other features different from how I did it).

- version-wise, I intend to bump up to 2.0 when rasterization is done. Current is 1.2.x internally, and externally, just successive dated snapshots.

- the pdf has a lot of figures... not sure if it is a good idea to splatter the repo with jpgs. I'll figure something out later.

- Freetype (is not GPL - it is BSD-like) allows modified binary distribution without source. Apple does that - freetype is part of core graphics. I do include patches applied and describe the patches in the README. The others in bin are all LGPL - and even GPL does not require *me* to provide source, just telling people where one can get source, and I do. The binaries are all verbatim from fedora binaries (except freetype and sharpfont), and you can get sources from fedora. IANAL though.

- the included patches were rejected by upstream (some were accepted by upstream and already there) as is. It needs further work to be included - discussion elsewhere.

- mono/c# is what I use, but visual studio is more popular. I am allowing the latter hoping to attract contributors.

-  Compat.2nd needs to be built at the 4th (?) stage after some other things than Compat . In general, Compat* are my replacements to Microsoft not-opened things.

-  Compat/Xsl.cs happens, to allow Mac OS X native exe (where one embeds the .net/mono exe with a mono runtime) to work. I might change how it is done later.

- Windows certs : because it needs a minimal number of 'trusted origins' to work, for the common signed fonts. I don't think I can embed the certificates themselves, so I just put enough to identify known-trusted ones.

CFF further work.

The new CFF checking as of Feb 2016 only parse for INDEX and DICT structures. These are the bulk of the CFF table so just parsing for them already is quite useful.

The 3 structures which are not parsed (yet) are: Charsets, Encodings, and CID FDSelect . An implementation for Encodings is already in my hard disk; only 10 fonts I have use it - 8 from Adobe (Adobe Arabic x4 and Adobe Hebrew x4) plus two toy demo fonts from other dev sources. Not surprising as equivalent functionality should be provided by cmap table in an opentype font. The 10 instances are all bare - i.e. zero-entry skeletal Encoding structure. Charsets seems mandatory, and FDSelect are not rare, so they need to be supported.

Detailed checking of CharStrings would be an ambitious plan - the bulk of Font Validator's code and running time spent is in the glyf table checking, and the rasterization test. Implementing equivalent checks for CFF would be a very long and large project.

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.