3

what is name of default font used in php gd library ? Here is image, rendered by php-gd with default font.

http://www.v7n.com/forums/attachments/coding-forum/11752d1269682180-php-gd-graph-links-dots-linegraph-php_gd_graph.jpg

Thanks,

user1288585
  • 31
  • 1
  • 2

2 Answers2

4

I was also looking for this info and, luckily, all these projects are free software therefore their source is publicly available which redeems the lack of details in the documentation.

  1. By default PHP uses GD built-in fonts called 1, 2, 3, 4 and 5 which only depends on font size.
  2. In GD those fonts are actually hard-coded in header files, for example: font 1 is tiny font
  3. Also, a comment in the header file reveals that this is derived from X Windows System fonts, i.e. -Misc-Fixed-Medium-R-Normal--8-80-75-75-C-50-ISO8859-2 which can be downloaded from here. For more details look at Wikipedia article on "Fixed typeface" (cannot put more than three links at the moment, sorry).
4ndY
  • 88
  • 7
0

Make an image with just text, and make the text large. Then, head over to whatthefont.com. Their analyzer is pretty solid.

sberry
  • 128,281
  • 18
  • 138
  • 165