By further creating a table of kerning and interline spacings for IM for all the fonts I use (*pant, pant!*) I can pretty closely match up the two. I've found a rather awkward work-around by not automatically word-wrapping on the web page (ie forcing the user to hit enter for a new line) I can be sure that line breaks are in known places. I guess I just surprised that they are so different! My problem is that IM renders fonts very differently to browsers - in every case I tried IM rendered the font with larger inter-character and inter-line spacings than the browsers did. Zoom isn't an issue as the actual pixel values remain the same. I've found all major browsers to be surprisingly consistent in font rendering, easily good enough for my purposes - a pixel or two doesn't matter. magick label. Or it can be complex with a plethora of options, as in the following. The ImageMagick command-line tools can be as simple as this. Thanks for taking an interest! I'd love to use the same method for both but I'm pretty much tied to IM for printing, and it would be impossible to allow the user to quickly create a WYSIWYG label if the system had to download a new image for every keystroke! The Anatomy of the Command-line Input Filename Command-line Options Output Filename. fmw42 can get you pointed in the right direction better than most of us. Added a link to an on-line article regarding the PHP front-end to ImageMagick. Of course, you will still need to understand how IM handles text. magick/annotate.c (RenderFreetype): Ensure that image storage class is. And even for one web browser, is it still true at every zoom and text size a user has set? For all past and future versions of the browser? This is not a matter of you not understanding or IM having a bug, this is a matter of there being variables beyond your control. I can't imagine that every browser and operating system renders your web page identically. If you NEED two results to be IDENTICAL, and for a proof this is a very legitimate need, you MUST generate them the same way. The way a font is rendered is controlled by much more than size. Then "click OK to approve the image, or EDIT to re-edit the form." But then you generate the image, and show that. Of course, the user might edit a form field, to type text, select the font and so on. Not helped by the massively different resolutions of screen and printers. If you use two different methods, you are in for a world of grief trying to ensure the two are the same. Snibgo wrote:I suggest you use the same method to generate the label for both purposes - for the user's approval on the web page, and for sending to the printer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |