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

False results when querying for a set #124

Closed vv-monsalve closed 3 years ago

vv-monsalve commented 3 years ago

Querying individual code points works well but whenever we try to query for a set such as uni-number-forms it says is fully supported while I know that is not.

Pic:

Screen Shot 2021-04-14 at 16 59 03

Resources to replicate: https://github.com/stipub/stixfonts/blob/master/fonts/static_ttf/STIXTwoMath-Regular.ttf

felipesanches commented 3 years ago

Interestingly, it works for me on Debian GNU/Linux: Screenshot from 2021-04-15 20-46-09

On the other hand, if I run it without passing a specific set explicitly, then it seems to detect many sets as "full" support level, which is surely incorrect: Screenshot from 2021-04-15 20-52-46

felipesanches commented 3 years ago

Inspecting it more thoroughly, the reported full sets seem to be accurate. STIXTwo Math contains almost 7 thousand glyphs.

felipesanches commented 3 years ago

so, I was not able to replicate @vv-monsalve's bug on my computer. I suspect the bad behaviour may be related to the error messages seen on her installation as described at #125

I will later try to replicate this bug on MacOS as well.

felipesanches commented 3 years ago

No, it is not related to #125 because uni-number-forms does not use the pyicu module. Instead, it relies on fetching and parsing data directly from http://www.unicode.org/Public/UNIDATA/Blocks.txt

There may be bugs in the parsing of that data.

felipesanches commented 3 years ago

I've successfully installed pyfontaine from git main on my OSX laptop and it worked well:

Captura de Tela 2021-04-16 às 05 23 14
felipesanches commented 3 years ago

I uninstalled fontaine from git (1.4.1-dev) and installed fontaine 1.4.0 form PyPI and I can see the problem. So it seems that we need to publish a new release so that people can benefit from the fix (it must have been fixed recently and I was not aware of it)

![Uploading Captura de Tela 2021-04-16 às 05.26.40.png…]()

felipesanches commented 3 years ago

@vv-monsalve For now, please git-clone pyfontaine and install it with pip install -e . form within the root of the repo dir.

vv-monsalve commented 3 years ago

Inspecting it more thoroughly, the reported full sets seem to be accurate. STIXTwo Math contains almost 7 thousand glyphs.

Yes, 6760 as we saw the other day, but still it doesn't imply the sets are fully covered ;)

vv-monsalve commented 3 years ago

@vv-monsalve For now, please git-clone pyfontaine and install it with pip install -e . form within the root of the repo dir.

We did run the pip install https://github.com/googlefonts/pyfontaine/archive/main.zip command at that moment and we got some Errors also (just in case). I would try it with the -e mode and let you know

vv-monsalve commented 3 years ago

@felipesanches I've just followed the new instructions, but I'm still receiving the same False Result

Screen Shot 2021-06-15 at 11 59 55

vv-monsalve commented 3 years ago

@vv-monsalve For now, please git-clone pyfontaine and install it with pip install -e . form within the root of the repo dir.

I've cloned the repo, cd to it to be at the root, but pip install -e is not working. Perhaps I'm missing something, should I change to another directory into it or append anything else to the command?

felipesanches commented 3 years ago

did you include the dot in the command? There is a dot right after -e

vv-monsalve commented 3 years ago

did you include the dot in the command? There is a dot right after -e

Mhm that was the missing part. I did it now and worked (under a venv).

Screen Shot 2021-06-15 at 14 23 51

felipesanches commented 3 years ago

Great! :-D