I have been tasked with converting a flex app into HTML and CSS. The existing app relies heavily on TextFlow for content layout, requiring precise positioning within a few pixels.
The current data structure 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>
My goal is to find a library that can help translate these attributes into valid HTML and CSS. While the current stack uses PHP and JavaScript, I am open to exploring other languages for this translation process.
If no suitable library is found, I will consider creating my own solution based on the api reference.