newsdev / ai2html

A script for Adobe Illustrator that converts your Illustrator artwork into an html page.
http://ai2html.org
Other
898 stars 146 forks source link

tracking misalignment #47

Closed briantjacobs closed 7 years ago

briantjacobs commented 7 years ago

I've been seeing some tracking misalignment in my html exports, and found this line

// pHash['tracking'] = pHash['tracking']/1000;
pHash['tracking'] = pHash['tracking']/1200;

(https://github.com/newsdev/ai2html/blob/master/ai2html.js#L1626-L1627)

When I instead use the /1000 line, things start lining up again. Is there something i'm missing why this was commented out? Thanks.

mbloch commented 7 years ago

The above code has been there since the script was first checked in. 1/1000 looks like the correct conversion, based on my testing as well. Archie gave the go-ahead, so I'm changing the value in ai2html-beta.js. It will be added to ai2html.js for the next release (v0.64).

This is only a hunch, but it's possible that the original 1/1000 conversion resulted in HTML text with a slightly longer line length than the AI text, which could cause inconsistent word wrapping in blocks of text. I'll keep an eye out for any problems like that.