how can I define and use local fonts on the server?
exec(Init::$static['path_imagemagick'].'convert -background none -fill "#04202e" -size x20 label:"test" gfx/gen/tmp.png');
I have som开发者_JAVA百科e fonts in this path:
./fonts/
See the documentation on the -font
parameter (emphasis mine):
-font name
set the font to use when annotating images with text, or creating labels. To print a complete list of fonts, use the -list font option (for versions prior to 6.3.6, use 'type' instead of 'font').
In addition to the fonts specified by the above pre-defined list, you can also specify a font from a specific source. For example Arial.ttf is a TrueType font file, ps:helvetica is PostScript font, and x:fixed is X11 font.
精彩评论