Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed #5

Closed
Shreeshrii opened this issue Mar 27, 2016 · 17 comments
Labels

Comments

@Shreeshrii
Copy link
Contributor

ra@Shree ~/tesseract-ocr/text2tif
$ git log -2
commit 0473f14f2921038751ba5341661e680f3a86dab7
Date:   Tue Mar 22 12:57:43 2016 +0200

    pango_font_info.cpp: Fix #ifdefs for MinGW and Cygwin

commit b59c24c74f6f1a8834076c767f09096182924fc4
Date:   Mon Mar 21 12:41:16 2016 +0200

    Alternative strcasestr() only needed on Windows

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

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

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

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

(process:8744): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
  1: 8514fix Bold

(process:8744): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
  2: 8514oem

(process:8744): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
  3: 8514oem Bold

(process:8744): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
  4: AR BERKLEY Bold
  5: AR BERKLEY Medium
  6: AR BLANCA Bold
  7: AR BLANCA Medium
It does list the fonts, but with the pango messages coming in between also.
@Shreeshrii
Copy link
Contributor Author

different output from fc-list vs list_available_fonts


ra@Shree ~/tesseract-ocr/text2tif
$  fc-list -f '%{family[0]} %{style[0]} \n' | sort  >fc-list-unique.txt

ra@Shree ~/tesseract-ocr/text2tif
$  fc-list | sort  >fc-list.txt 2>&1

ra@Shree ~/tesseract-ocr/text2tif
$ ./text2tif --list_available_fonts > list_available_fonts.txt 2>&1

ra@Shree ~/tesseract-ocr/text2tif

list_available_fonts.txt
fc-list.txt
fc-list-unique.txt

@Shreeshrii
Copy link
Contributor Author

Possibly fonts other than ttf and otf are giving Pango errors..

@amitdo
Copy link
Owner

amitdo commented Mar 27, 2016

Please move the 'fc-list' thing to another issue.

@amitdo
Copy link
Owner

amitdo commented Mar 27, 2016

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
Copy link
Owner

amitdo commented Mar 27, 2016

What is the path of these fonts?

@Shreeshrii
Copy link
Contributor Author

fc-list.txt has path for the font files also... some samples of fonts which may be causing problems listed below.

You may want to download the text file and sort based on the font extensions to see whether that's the problem.

/usr/share/fonts/win-fonts/8514fix.fon: Fixedsys:style=Regular
/usr/share/fonts/win-fonts/8514fixe.fon: Fixedsys:style=Regular
/usr/share/fonts/win-fonts/8514fixg.fon: Fixedsys:style=Regular
/usr/share/fonts/win-fonts/8514fixr.fon: Fixedsys:style=Regular
/usr/share/fonts/win-fonts/8514fixt.fon: Fixedsys:style=Regular
/usr/share/fonts/win-fonts/8514oem.fon: 8514oem:style=Regular
/usr/share/fonts/win-fonts/8514oeme.fon: Terminal:style=Regular
/usr/share/fonts/win-fonts/8514oemg.fon: Terminal Greek 737 (437G):style=Regular
/usr/share/fonts/win-fonts/8514oemr.fon: Terminal:style=Regular
/usr/share/fonts/win-fonts/8514oemt.fon: 8514oem:style=Regular
/usr/share/fonts/win-fonts/8514sys.fon: System:style=Regular
/usr/share/fonts/win-fonts/8514syse.fon: System:style=Regular
/usr/share/fonts/win-fonts/8514sysg.fon: System:style=Regular
/usr/share/fonts/win-fonts/8514sysr.fon: System:style=Regular
/usr/share/fonts/win-fonts/8514syst.fon: System:style=Regular
/usr/share/fonts/win-fonts/85775.fon: Terminal:style=Regular
/usr/share/fonts/win-fonts/85855.fon: Terminal:style=Regular
/usr/share/fonts/win-fonts/85f1255.fon: Fixedsys:style=Regular
/usr/share/fonts/win-fonts/85f1256.fon: Fixedsys:style=Regular
/usr/share/fonts/win-fonts/85f1257.fon: Fixedsys:style=Regular
/usr/share/fonts/win-fonts/85f874.fon: Fixedsys:style=Regular
/usr/share/fonts/win-fonts/85s1255.fon: System:style=Regular
/usr/share/fonts/win-fonts/85s1256.fon: System:style=Regular
/usr/share/fonts/win-fonts/85s1257.fon: System:style=Regular
/usr/share/fonts/win-fonts/85s874.fon: System:style=Regular

/usr/share/ghostscript/fonts/a010013l.pfb: URW Gothic L:style=Book
/usr/share/ghostscript/fonts/a010015l.pfb: URW Gothic L:style=Demi
/usr/share/ghostscript/fonts/a010033l.pfb: URW Gothic L:style=Book Oblique
/usr/share/ghostscript/fonts/a010035l.pfb: URW Gothic L:style=Demi Oblique
/usr/share/ghostscript/fonts/b018012l.pfb: URW Bookman L:style=Light
/usr/share/ghostscript/fonts/b018015l.pfb: URW Bookman L:style=Demi Bold
/usr/share/ghostscript/fonts/b018032l.pfb: URW Bookman L:style=Light Italic
/usr/share/ghostscript/fonts/b018035l.pfb: URW Bookman L:style=Demi Bold Italic
/usr/share/ghostscript/fonts/bchb.pfa: Bitstream Charter:style=Bold
/usr/share/ghostscript/fonts/bchbi.pfa: Bitstream Charter:style=Bold Italic
/usr/share/ghostscript/fonts/bchr.pfa: Bitstream Charter:style=Regular
/usr/share/ghostscript/fonts/bchri.pfa: Bitstream Charter:style=Italic
/usr/share/ghostscript/fonts/c059013l.pfb: Century Schoolbook L:style=Roman
/usr/share/ghostscript/fonts/c059016l.pfb: Century Schoolbook L:style=Bold
/usr/share/ghostscript/fonts/c059033l.pfb: Century Schoolbook L:style=Italic
/usr/share/ghostscript/fonts/c059036l.pfb: Century Schoolbook L:style=Bold Italic
/usr/share/ghostscript/fonts/d050000l.pfb: Dingbats:style=Regular

/usr/share/fonts/win-fonts/simsun.ttc: NSimSun,新宋体:style=Regular,常规
/usr/share/fonts/win-fonts/simsun.ttc: SimSun,宋体:style=Regular,常规
/usr/share/fonts/win-fonts/simsunb.ttf: SimSun\-ExtB:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/fonts/win-fonts/Sitka.ttc: Sitka Banner,Sitka:style=Regular,Banner
/usr/share/fonts/win-fonts/Sitka.ttc: Sitka Display,Sitka:style=Regular,Display
/usr/share/fonts/win-fonts/Sitka.ttc: Sitka Heading,Sitka:style=Regular,Heading

@amitdo
Copy link
Owner

amitdo commented Mar 28, 2016

run:
fc-cache

and then try again:
./text2tif --list_available_fonts

@Shreeshrii
Copy link
Contributor Author


ra@Shree ~/tesseract-ocr/text2tif
$ fc-cache

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
  1: 8514fix Bold

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
  2: 8514oem

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
  3: 8514oem Bold

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
  4: AR BERKLEY Bold
  5: AR BERKLEY Medium
  6: AR BLANCA Bold
  7: AR BLANCA Medium
  8: AR BONNIE Bold
  9: AR BONNIE Medium
 10: AR CARTER Bold
 11: AR CARTER Medium
 12: AR CENA Bold
 13: AR CENA Medium
 14: AR CHRISTY Bold
 15: AR CHRISTY Medium
 16: AR DARLING Bold
 17: AR DARLING Medium
 18: AR DECODE Bold
 19: AR DECODE Medium
 20: AR DELANEY Bold
 21: AR DELANEY Medium
 22: AR DESTINE Bold
 23: AR DESTINE Medium
 24: AR ESSENCE Bold
 25: AR ESSENCE Medium
 26: AR HERMANN Bold
 27: AR HERMANN Medium
 28: AR JULIAN Bold
 29: AR JULIAN Medium
 30: Aksharyogini2
 31: Aksharyogini2 Bold
 32: Aparajita
 33: Aparajita Bold
 34: Aparajita Bold Italic
 35: Aparajita Italic
 36: Arial
 37: Arial Bold
 38: Arial Bold Italic
 39: Arial Heavy
 40: Arial Italic
 41: Bitstream Charter
 42: Bitstream Charter Bold
 43: Bitstream Charter Bold Italic
 44: Bitstream Charter Italic
 45: Calibri
 46: Calibri Bold
 47: Calibri Bold Italic
 48: Calibri Italic
 49: Calibri Light
 50: Calibri Light Italic
 51: Cambria
 52: Cambria Bold
 53: Cambria Bold Italic
 54: Cambria Italic
 55: Cambria Math
 56: Cambria Math Bold
 57: Candara
 58: Candara Bold
 59: Candara Bold Italic
 60: Candara Italic
 61: Century Schoolbook L Bold
 62: Century Schoolbook L Bold Italic
 63: Century Schoolbook L Italic
 64: Century Schoolbook L Medium
 65: Comic Sans MS
 66: Comic Sans MS Bold
 67: Comic Sans MS Bold Italic
 68: Comic Sans MS Italic
 69: Consolas
 70: Consolas Bold
 71: Consolas Bold Italic
 72: Consolas Italic
 73: Constantia
 74: Constantia Bold
 75: Constantia Bold Italic
 76: Constantia Italic
 77: Corbel
 78: Corbel Bold
 79: Corbel Bold Italic
 80: Corbel Italic
 81: Courier
 82: Courier Bold
 83: Courier New
 84: Courier New Bold
 85: Courier New Bold Italic
 86: Courier New Italic
 87: DejaVu Sans
 88: DejaVu Sans Bold
 89: DejaVu Sans Bold Oblique
 90: DejaVu Sans Bold Oblique Semi-Condensed
 91: DejaVu Sans Bold Semi-Condensed
 92: DejaVu Sans Mono
 93: DejaVu Sans Mono Bold
 94: DejaVu Sans Mono Bold Oblique
 95: DejaVu Sans Mono Oblique
 96: DejaVu Sans Oblique
 97: DejaVu Sans Oblique Semi-Condensed
 98: DejaVu Sans Semi-Condensed
 99: DejaVu Sans Ultra-Light
100: DejaVu Serif
101: DejaVu Serif Bold
102: DejaVu Serif Bold Italic
103: DejaVu Serif Bold Italic Semi-Condensed
104: DejaVu Serif Bold Semi-Condensed
105: DejaVu Serif Italic
106: DejaVu Serif Italic Semi-Condensed
107: DejaVu Serif Semi-Condensed
108: Dingbats
109: Dingbats Bold
110: Ebrima
111: Ebrima Bold
112: Fixedsys

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
113: Fixedsys Bold

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
114: Franklin Gothic Medium,
115: Franklin Gothic Medium, Bold
116: Franklin Gothic Medium, Bold Italic
117: Franklin Gothic Medium, Italic
118: Gabriola
119: Gabriola Bold
120: Gadugi
121: Gadugi Bold
122: Georgia
123: Georgia Bold
124: Georgia Bold Italic
125: Georgia Italic
126: Hershey-Gothic-English
127: Hershey-Gothic-English Bold
128: Hershey-Gothic-German
129: Hershey-Gothic-German Bold
130: Hershey-Gothic-Italian
131: Hershey-Gothic-Italian Bold
132: Hershey-Plain-Duplex
133: Hershey-Plain-Duplex Bold
134: Hershey-Plain-Duplex-Italic
135: Hershey-Plain-Duplex-Italic Bold
136: Hershey-Plain-Triplex
137: Hershey-Plain-Triplex Bold
138: Hershey-Plain-Triplex-Italic
139: Hershey-Plain-Triplex-Italic Bold
140: Hershey-Script-Complex
141: Hershey-Script-Complex Bold
142: Hershey-Script-Simplex
143: Hershey-Script-Simplex Bold
144: Impact Condensed
145: Javanese Text
146: Javanese Text Bold
147: Kokila
148: Kokila Bold
149: Kokila Bold Italic
150: Kokila Italic
151: Leelawadee UI
152: Leelawadee UI Bold
153: Leelawadee UI Semi-Light
154: Lohit Assamese
155: Lohit Assamese Bold
156: Lohit Bengali
157: Lohit Bengali Bold
158: Lohit Devanagari
159: Lohit Devanagari Bold
160: Lohit Gujarati
161: Lohit Gujarati Bold
162: Lohit Gurmukhi
163: Lohit Gurmukhi Bold
164: Lohit Kannada
165: Lohit Kannada Bold
166: Lohit Malayalam
167: Lohit Malayalam Bold
168: Lohit Marathi
169: Lohit Marathi Bold
170: Lohit Odia
171: Lohit Odia Bold
172: Lohit Tamil
173: Lohit Tamil Bold
174: Lohit Tamil Classical
175: Lohit Tamil Classical Bold
176: Lohit Telugu
177: Lohit Telugu Bold
178: Lucida Console Semi-Condensed
179: Lucida Sans Unicode
180: Lucida Sans Unicode Bold
181: MS Gothic
182: MS Gothic Bold
183: MS PGothic
184: MS PGothic Bold
185: MS Sans Serif

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
186: MS Sans Serif Bold

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
187: MS Serif

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
188: MS Serif Bold

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
189: MS UI Gothic
190: MS UI Gothic Bold
191: MV Boli
192: MV Boli Bold
193: Malgun Gothic
194: Malgun Gothic Bold
195: Malgun Gothic Light
196: Mangal
197: Mangal Bold
198: Marlett Bold
199: Marlett Medium
200: Microsoft Himalaya
201: Microsoft Himalaya Bold
202: Microsoft JhengHei
203: Microsoft JhengHei Bold
204: Microsoft JhengHei Light
205: Microsoft JhengHei UI
206: Microsoft JhengHei UI Bold
207: Microsoft JhengHei UI Light
208: Microsoft New Tai Lue
209: Microsoft New Tai Lue Bold
210: Microsoft PhagsPa
211: Microsoft PhagsPa Bold
212: Microsoft Sans Serif
213: Microsoft Sans Serif Bold
214: Microsoft Tai Le
215: Microsoft Tai Le Bold
216: Microsoft YaHei
217: Microsoft YaHei Bold
218: Microsoft YaHei Light
219: Microsoft YaHei UI
220: Microsoft YaHei UI Bold
221: Microsoft YaHei UI Light
222: Microsoft Yi Baiti
223: Microsoft Yi Baiti Bold
224: MingLiU-ExtB
225: MingLiU-ExtB Bold
226: MingLiU_HKSCS-ExtB
227: MingLiU_HKSCS-ExtB Bold
228: Mongolian Baiti
229: Mongolian Baiti Bold
230: Myanmar Text
231: Myanmar Text Bold
232: NSimSun
233: NSimSun Bold
234: Nimbus Mono L
235: Nimbus Mono L Bold
236: Nimbus Mono L Bold Oblique
237: Nimbus Mono L Oblique
238: Nimbus Roman No9 L
239: Nimbus Roman No9 L Bold
240: Nimbus Roman No9 L Bold Italic
241: Nimbus Roman No9 L Italic
242: Nimbus Roman No9 L Medium
243: Nimbus Roman No9 L Medium Italic
244: Nimbus Sans L
245: Nimbus Sans L Bold
246: Nimbus Sans L Bold Condensed
247: Nimbus Sans L Bold Italic
248: Nimbus Sans L Bold Italic Condensed
249: Nimbus Sans L Condensed
250: Nimbus Sans L Italic
251: Nimbus Sans L Italic Condensed
252: Nirmala UI
253: Nirmala UI Bold
254: Nirmala UI Semi-Light
255: PMingLiU-ExtB
256: PMingLiU-ExtB Bold
257: Palatino Linotype
258: Palatino Linotype Bold
259: Palatino Linotype Bold Italic
260: Palatino Linotype Italic
261: Sanskrit Text
262: Sanskrit Text Bold
263: Segoe MDL2 Assets
264: Segoe MDL2 Assets Bold
265: Segoe Print
266: Segoe Print Bold
267: Segoe Script
268: Segoe Script Bold
269: Segoe UI
270: Segoe UI Bold
271: Segoe UI Bold Italic
272: Segoe UI Emoji
273: Segoe UI Emoji Bold
274: Segoe UI Heavy
275: Segoe UI Heavy Italic
276: Segoe UI Historic
277: Segoe UI Historic Bold
278: Segoe UI Italic
279: Segoe UI Light
280: Segoe UI Light Italic
281: Segoe UI Semi-Bold
282: Segoe UI Semi-Bold Italic
283: Segoe UI Semi-Light
284: Segoe UI Semi-Light Italic
285: Segoe UI Symbol
286: Segoe UI Symbol Bold
287: SimSun
288: SimSun Bold
289: SimSun-ExtB
290: SimSun-ExtB Bold
291: Sitka Banner
292: Sitka Banner Bold
293: Sitka Banner Bold Italic
294: Sitka Banner Italic
295: Sitka Display
296: Sitka Display Bold
297: Sitka Display Bold Italic
298: Sitka Display Italic
299: Sitka Heading
300: Sitka Heading Bold
301: Sitka Heading Bold Italic
302: Sitka Heading Italic
303: Sitka Small
304: Sitka Small Bold
305: Sitka Small Bold Italic
306: Sitka Small Italic
307: Sitka Subheading
308: Sitka Subheading Bold
309: Sitka Subheading Bold Italic
310: Sitka Subheading Italic
311: Sitka Text
312: Sitka Text Bold
313: Sitka Text Bold Italic
314: Sitka Text Italic
315: Small Fonts

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
316: Small Fonts Bold

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
317: Standard Symbols L
318: Standard Symbols L Bold
319: Sylfaen
320: Sylfaen Bold
321: Symbol
322: Symbol Bold
323: System

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
324: System Bold

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
325: Tahoma
326: Tahoma Bold
327: Terminal

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
328: Terminal Bold

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
329: Terminal Greek 737 (437G)

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
330: Terminal Greek 737 (437G) Bold

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
331: Terminal Greek 869 Bold

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
332: Terminal Greek 869,

(process:8476): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
333: Times New Roman,
334: Times New Roman, Bold
335: Times New Roman, Bold Italic
336: Times New Roman, Italic
337: Trebuchet MS
338: Trebuchet MS Bold
339: Trebuchet MS Bold Italic
340: Trebuchet MS Italic
341: URW Bookman L Bold
342: URW Bookman L Bold Italic
343: URW Bookman L Italic
344: URW Bookman L Medium
345: URW Chancery L Bold Italic
346: URW Chancery L Medium Italic
347: URW Gothic L Book
348: URW Gothic L Book Oblique
349: URW Gothic L Semi-Bold
350: URW Gothic L Semi-Bold Oblique
351: URW Palladio L Bold
352: URW Palladio L Bold Italic
353: URW Palladio L Italic
354: URW Palladio L Medium
355: Unifont Bold
356: Unifont Medium
357: Unifont Upper Bold
358: Unifont Upper Medium
359: Utopia
360: Utopia Bold
361: Utopia Bold Italic
362: Utopia Italic
363: Utsaah
364: Utsaah Bold
365: Utsaah Bold Italic
366: Utsaah Italic
367: Verdana
368: Verdana Bold
369: Verdana Bold Italic
370: Verdana Italic
371: Webdings
372: Webdings Bold
373: Wingdings
374: Wingdings Bold
375: Yu Gothic
376: Yu Gothic Bold
377: Yu Gothic Light
378: Yu Gothic Medium
379: Yu Gothic UI
380: Yu Gothic UI Bold
381: Yu Gothic UI Light
382: Yu Gothic UI Semi-Bold
383: Yu Gothic UI Semi-Light

@amitdo
Copy link
Owner

amitdo commented Mar 28, 2016

./text2tif --list_available_fonts --fontconfig_refresh_config_file=false

Any difference?

@Shreeshrii
Copy link
Contributor Author

No difference. Same result.

@Shreeshrii
Copy link
Contributor Author

(gdb) run --list_available_fonts --fontconfig_refresh_config_file=false
Starting program: /home/ra/tesseract-ocr/text2tif/text2tif --list_available_fonts --fontconfig_refresh_config_file=false
[New Thread 6628.0x1fdc]
[New Thread 6628.0x206c]
[New Thread 6628.0x1a4c]
[New Thread 6628.0x2d8]
[New Thread 6628.0xa7c]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

(process:6628): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
  1: 8514fix Bold

(process:6628): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
  2: 8514oem

(process:6628): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
  3: 8514oem Bold

(process:6628): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed
  4: AR BERKLEY Bold
  5: AR BERKLEY Medium
  6: AR BLANCA Bold
  7: AR BLANCA Medium
  8: AR BONNIE Bold
  9: AR BONNIE Medium
 10: AR CARTER Bold

382: Yu Gothic UI Semi-Bold
383: Yu Gothic UI Semi-Light
[Thread 6628.0x1a4c exited with code 0]
[Thread 6628.0x206c exited with code 0]
[Thread 6628.0xa7c exited with code 0]
[Thread 6628.0x2d8 exited with code 0]
[Inferior 1 (process 6628) exited normally]
(gdb)

@amitdo
Copy link
Owner

amitdo commented Mar 28, 2016

What output do you get when you run:

./text2tif --text=../langdata/eng/eng.training_txt --outputbase=../langdata/gen/eng.MSSerifBold.exp0 --font='MS Serif Bold' --fonts_dir=/usr/share/fonts

@Shreeshrii
Copy link
Contributor Author

on CYGWIN


ra@Shree ~/tesseract-ocr/text2tif
$ ./text2tif --text=../langdata/eng/eng.training_txt --outputbase=../langdata/gen/eng.MSSerifBold.exp0 --font='MS Serif Bold' --fonts_dir=/usr/share/fonts
Could not find font named MS Serif Bold. Pango suggested font MS Serif
Please correct '--font' arg.

@amitdo amitdo added the Cygwin label Mar 31, 2016
@amitdo
Copy link
Owner

amitdo commented Apr 1, 2016

You can now use:
./text2tif --list_available_fonts 2>/dev/null
or
./text2tif --list_available_fonts 2>/dev/null > all-fonts.txt

Magic! ;-)

@Shreeshrii
Copy link
Contributor Author

Lost the windows fonts after reinstalling cygwin, installing ghostscript
Added via symlink as below - noting for reference

DejaVu Serif Semi-Condensed
=== Total:  21 fonts ===

shree@lenovo ~/text2tif
$ ln -s /cygdrive/c/Windows/Fonts /usr/share/fonts/win-fonts

shree@lenovo ~/text2tif
$ fc-cache
/usr/share/fonts: failed to write cache

shree@lenovo ~/text2tif
$ fc-cache

Yu Gothic UI Bold
Yu Gothic UI Light
Yu Gothic UI Semi-Bold
Yu Gothic UI Semi-Light
gargi Medium
=== Total: 277 fonts ===

@Shreeshrii
Copy link
Contributor Author

CYGWIN


shree@lenovo ~/text2tif
$ ./text2tif --list_available_fonts 2>/dev/null
8514fix
8514fix Bold
8514oem
8514oem Bold
AA_NAGARI_SHREE_L3
AA_NAGARI_SHREE_L3 Bold
AR BERKLEY Bold
AR BERKLEY Medium
AR BLANCA Bold
AR BLANCA Medium
AR BONNIE Bold
...
Yu Gothic UI
Yu Gothic UI Bold
Yu Gothic UI Light
Yu Gothic UI Semi-Bold
Yu Gothic UI Semi-Light
gargi Bold
gargi Medium

shree@lenovo ~/text2tif

@Shreeshrii
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants