I have a task to recreate a flexible application in HTML and CSS. In an existing application, TextFlow is widely used to compose content. For several reasons, I need to be reasonably accurate (within a few pixels) with positioning.
The current application is loading data that looks like this:
<p paragraphstartindent="0" textalign="center"><span alignmentbaseline="useDominantBaseline" backgroundalpha="1" backgroundcolor="transparent" baselineshift="0" breakopportunity="auto" cffhinting="horizontalStem" color="0x0" digitcase="default" digitwidth="default" dominantbaseline="auto" fontfamily="ArialCFF" fontlookup="embeddedCFF" fontsize="22" fontstyle="normal" fontweight="bold" kerning="auto" ligaturelevel="common" lineheight="120%" linethrough="false" locale="en" renderingmode="cff" textalpha="1" textdecoration="none" textrotation="auto" trackingleft="0" trackingright="0" typographiccase="default">Here is some content which needs to be accurately positioned</span></p>
Ideally, I am looking for a library that I can use to translate these many attributes into the "correct" html and css. The current technology stack is PHP on the back panel and javascript in the interface, but there will be no problem using any other language for translation.
Otherwise, I think I will try to write my own using the api link as a guide.
Pete o
source share