Search the FirstSpirit Knowledge Base
Hello,
is it possible to get the width of a picture that was generated by the CMS font function?
I generate a picture like this:
Example: $CMS_REF(font(font:font_family,size:20,justify:font_justify,yspace:5,xspace:10,filetype:"jpg",height:25,color:"#000000",text_antialiasing:true,text:st_zeile1))$
And after that I need the width / heigt of this image?
This should do the trick:
$CMS_SET(myFontImage, font(....))$
<img src="$CMS_REF(myFontImage)$" width="$CMS_VALUE(myFontImage.width)$" height="$CMS_VALUE(myFontImage.height)$">
Disclaimer: Not tested, typos possible.
This should do the trick:
$CMS_SET(myFontImage, font(....))$
<img src="$CMS_REF(myFontImage)$" width="$CMS_VALUE(myFontImage.width)$" height="$CMS_VALUE(myFontImage.height)$">
Disclaimer: Not tested, typos possible.
Thank you 🙂