googlefonts / pyfontaine

Python tool to check font files for language/character set support
https://github.com/googlefonts/pyfontaine
GNU General Public License v3.0
104 stars 20 forks source link

Output consistent JSON keys #76

Closed davelab6 closed 8 years ago

davelab6 commented 9 years ago

Change the JSON output format in https://github.com/davelab6/pyfontaine/blob/master/fontaine/builder.py to have the same keys for all the orthographies.

Currently the output differs for different levels of support:

     {  
        'commonName':"Afar  (fc-lang/aa.orth)",
        'nativeName':"",
        'supportLevel':"full"
     },
     { 
        'commonName':"Tonga  (fc-lang/to.orth)",
        'nativeName':"",
        'Coverage':"53",
        'SetTotal':"52",
        'percentCoverage':"98",
        'supportLevel':"partial"
     },
     {  
        'commonName':"Vietnamese  (fc-lang/vi.orth)",
        'nativeName':"",
        'Coverage':"194",
        'SetTotal':"98",
        'percentCoverage':"50",
        'supportLevel':"fragmentary"
     }

It should be, eg

     {  
        'commonName':"Afar  (fc-lang/aa.orth)",
        'nativeName':"",
        'Coverage':"123",
        'SetTotal':"123",
        'percentCoverage':"100",
        'supportLevel':"full"
     },
     { 
        'commonName':"Tonga  (fc-lang/to.orth)",
        'nativeName':"",
        'Coverage':"53",
        'SetTotal':"52",
        'percentCoverage':"98",
        'supportLevel':"partial"
     },
     {  
        'commonName':"Vietnamese  (fc-lang/vi.orth)",
        'nativeName':"",
        'Coverage':"194",
        'SetTotal':"98",
        'percentCoverage':"50",
        'supportLevel':"fragmentary"
     }