[TYPO3] Using NDASH and MDASH in GIFBUILDER text
Joerg Wagner
jwagner at digilog.de
Mon Apr 3 14:49:07 CEST 2006
Hi Joey,
> Did you check if it works for other HTML entities?
> text = XXX - & | YYY
> Should give you XXX - & | YYY
nope! They do not. But I have to correct my statement a bit:
1.:
– and #x2013; appear as plain text ("– #x2013;") - so they
are automatically htmlSpecialChared without setting the htmlSpecialChar
prop. So are & < > ä etc.
2.:
The latin1 char with charcode 150 appears as a placeholder rectangle instead
as an ndash.
3.:
The entity – actually DOES render an ndash! It is the only one that
does and the only way to enter that character.
4.
doNotStripHTML = 1
is obsolete in this case. It only works on HTML tags, not on entities.
Using a normal TEXT object, ALL four encoding versions result in a nice
ndash as expected!
There is a way to partially solve at least point 1. of the list:
text.HTMLparser = 1
text.HTMLparser.htmlSpecialChars = -1
This renders < > & as the corresponding characters into the
resulting image.
But ä – – are all still rendered as strings ("ä
– –") into the image.
Well, using the encoding – there is at least a workaround to output an
ndash (not very handy for editors though). But the whole attitude of
GIFBUILDER seems rather erratic concerning special characters. The only
stable way to get those chars rendered seems to be the &#DEZIMALUTF8;
version of the char entities.
Below is a new TS block to reproduce all cases as GIFBUILDER image
(including the HTMLparser filter for point 1) and as normal text output.
--
Jörg Wagner
DigiLog multimedia
page.100 = IMAGE
page.100.file = GIFBUILDER
page.100.file {
XY = 600,200
backColor = #eeeeee
10 = TEXT
10{
text = XXX - ä > < & | YYY – –
– ZZZ — — — AAA
text.HTMLparser = 1
text.HTMLparser.htmlSpecialChars = -1
fontSize = 16
fontColor = #000000
offset = 25,125
niceText = 1
fontFile = fileadmin/fonts/ARIALN.TTF
}
}
page.110 = TEXT
page.110{
value = XXX - ä > < & | YYY – –
– ZZZ — — — AAA
}
"JoH" <info at cybercraft.de> schrieb im Newsbeitrag
news:mailman.1.1144064347.26963.typo3-english at lists.netfielders.de...
>>>> I just dropped onto a limitation in GIFBUILDER text:
>>>> There seems to be no way to render an ndash or mdash character.
>>>>
>>>> I tried all ways of encoding:
>>>> text = XXX - – – – YYY
>>>> and
>>>> text = XXX - — — — YYY
>>>> but all I get is some placeholder character instead of the dash.
>>>>
>>>> Any idea how this can be done?
>>>
>>> Are you sure the font file "ARIALN.TTF" contains a character for
>>> ndash or mdash?
>>
>> yes, that was the first thing I checked. This is a standard WinXP
>> font file. It contains these dashes at the right UTF encoding
>> positions and they also work nicely if used as HTML entities in
>> normal body text with "font-face: Arial; font-weight: normal;
>> font-style: normal;" (which is ARIALN.TTF on WinXP).
>
> OK.
>
> Did you check if it works for other HTML entities?
> text = XXX - & | YYY
> Should give you XXX - & | YYY
>
> Joey
>
> --
> Wenn man keine Ahnung hat: Einfach mal Fresse halten!
> (If you have no clues: simply shut your knob sometimes!)
> Dieter Nuhr, German comedian
> openBC: http://www.cybercraft.de
>
>
More information about the TYPO3-english
mailing list