amitdo / text2tif-2016

A fork of Tesseract's text2image program
Other
0 stars 0 forks source link

./text2tif --list_available_fonts #7

Closed Shreeshrii closed 8 years ago

Shreeshrii commented 8 years ago

Test from last week


ra@Shree MINGW64 ~/text2tif
$ ./text2tif --list_available_fonts
Unable to open '/tmp/fonts.conf' for writing
  0: AR BERKLEY
  1: AR BLANCA
  2: AR BONNIE
  3: AR CARTER
  4: AR CENA
  5: AR CHRISTY
etc

ra@Shree MINGW64 ~/text2tif
$ ./text2tif --list_available_fonts --fontconfig_tmpdir ../tmp
Unable to open '../tmp/fonts.conf' for writing
  0: AR BERKLEY
  1: AR BLANCA
  2: AR BONNIE
  3: AR CARTER
  4: AR CENA
etc

ra@Shree MINGW64 ~/text2tif
$ ./text2tif --list_available_fonts --fontconfig_tmpdir ../temp
FcInitiReinitialize failed!!
  0: AR BERKLEY
  1: AR BLANCA
  2: AR BONNIE
  3: AR CARTER
  4: AR CENA
  5: AR CHRISTY
  6: AR DARLING
etc

ra@Shree MINGW64 ~/text2tif
$ ./text2tif --fonts_dir= --list_available_fonts
  0: AR BERKLEY
  1: AR BLANCA
  2: AR BONNIE
  3: AR CARTER
  4: AR CENA
  5: AR CHRISTY
  6: AR DARLING
  7: AR DECODE
etc
Shreeshrii commented 8 years ago

on CYGWIN on 27th


ra@Shree ~/tesseract-ocr/text2tif
$ ./text2tif --list_available_fonts

(process:9036): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed

(process:9036): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
ra@Shree ~/tesseract-ocr/text2tif
$ ./text2tif --list_available_fonts --fontconfig_tmpdir ../temp

(process:6376): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
ra@Shree ~/tesseract-ocr/text2tif
$ ./text2tif --fonts_dir= --list_available_fonts

(process:5560): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed

(process:5560): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
Shreeshrii commented 8 years ago

ON MSYS2/MINGW64 on 27th

ra@Shree MINGW64 ~/text2tif
$ ./text2tif --list_available_fonts
  0: AR BERKLEY
  1: AR BLANCA
  2: AR BONNIE
  3: AR CARTER
  4: AR CENA
  5: AR CHRISTY
ra@Shree MINGW64 ~/text2tif
$  ./text2tif --list_available_fonts --fontconfig_tmpdir ../temp
  0: AR BERKLEY
  1: AR BLANCA
  2: AR BONNIE
  3: AR CARTER
  4: AR CENA
  5: AR CHRISTY
  6: AR DARLING
  7: AR DECODE
  8: AR DELANEY
ra@Shree MINGW64 ~/text2tif
$ ./text2tif --fonts_dir= --list_available_fonts
  0: AR BERKLEY
  1: AR BLANCA
  2: AR BONNIE
  3: AR CARTER
  4: AR CENA
  5: AR CHRISTY
  6: AR DARLING
  7: AR DECODE
  8: AR DELANEY
  9: AR DESTINE
Shreeshrii commented 8 years ago

Complete list on MSYS2

ra@Shree MINGW64 ~/text2tif
$ ./text2tif --fonts_dir= --list_available_fonts

available-fonts.txt

Shreeshrii commented 8 years ago

MSYS2 fc-list fc-list -f '%{family[0]} %{style[0]} \n' | sort -u fc-list.txt

amitdo commented 8 years ago

https://github.com/amitdo/text2tif/commit/ac0a24c93271f1a4076d160eb838533fa0fd9ed7 Now, the output of: ./text2tif --list_available_fonts should be identical to: ./text2tif --list_available_fonts --fonts_dir=

Shreeshrii commented 8 years ago

Yes, the output from both is same. Also, no more error regarding FcInitiReinitialize failed!!

Shreeshrii commented 8 years ago

However there is a difference between the list via fc-list and the one from --list_available_fonts

And it seems to be the fonts causing the Pango Critical error

amitdo commented 8 years ago

Small change: https://github.com/amitdo/text2tif/commit/aad66b9728a7b4f1074aec73d6371bf734b16ec2

Shreeshrii commented 8 years ago

MSYS2/Mingw64

shree@lenovo MINGW64 ~/text2tif
$ ./text2tif --list_available_fonts
AA_NAGARI_SHREE_L3
AR BERKLEY
AR BLANCA
AR BONNIE
AR CARTER
AR CENA

shree@lenovo MINGW64 ~/text2tif
$ ./text2tif --list_available_fonts --fontconfig_tmpdir ../tmp
AA_NAGARI_SHREE_L3
AR BERKLEY
AR BLANCA
AR BONNIE
AR CARTER

shree@lenovo MINGW64 ~/text2tif
$ ./text2tif --list_available_fonts --fontconfig_tmpdir ../temp
AA_NAGARI_SHREE_L3
AR BERKLEY
AR BLANCA
AR BONNIE
AR CARTER
AR CENA

shree@lenovo MINGW64 ~/text2tif
$ ./text2tif --fonts_dir= --list_available_fonts
AA_NAGARI_SHREE_L3
AR BERKLEY
AR BLANCA
AR BONNIE
AR CARTER
Shreeshrii commented 8 years ago

CYGWIN

shree@lenovo ~/text2tif
$ ./text2tif --fonts_dir=/usr/share/fonts --list_available_fonts
8514fix
8514oem
AA_NAGARI_SHREE_L3
AR BERKLEY Medium
AR BLANCA Medium
...
Yu Gothic UI Light
Yu Gothic UI Semi-Bold
Yu Gothic UI Semi-Light
gargi Medium
=== Total: 278 fonts ===

All other variations give the Pango warning and list more fonts