Bug #16759
closedincorrect rendering of umlauts with opentype fonts...
0%
Description
hello
i use typo3 with graphics magick 1.1.6 and freetype.
it works fine with truetype ttf-fonts.
buth with opentype otf-fonts german umlauts would not rendered correctly!
instead an umlaut like ä there is only a box crossed with two lines.
is it a bug of freetype or typo3?
or is it another program in this constellation?
(issue imported from #M4603)
Files
Updated by Michael Stucki over 17 years ago
Can you check if the font really contains this umlaut character inside? Otherwise the problem is obviously not a TYPO3 issue.
Btw. font rendering in TYPO3 is done by GD/Freetype, it has nothing to do with GraphicsMagick and/or ImageMagick.
Updated by Martin Kutschker over 17 years ago
TYPO3 expects the font to use Unicode code points for glyph mapping. There are also fonts available that use Latin 1 or some Mac encoding.
Have a look at t3lib_stgdraphic. Note the variables $TTFLocaleConv and $nativeCharset. Then try and fiddle with it's values, but look at recodeString($string) to get what's going on.
Updated by Stefan Krapf over 17 years ago
the font (see attached MyriadPro-SemiCn.otf) definitively contains umlaut characters.
therefore i think its a freetype problem too.
i use some layoutprograms (quarkxpress) with the same font on a windows machine and the umlauts are showing with no problems.
@martin: hmm, this things are to high for me. i'm a newbie to typo3.
i must look for more information on these things...
or maybe you could give me some links.
are this variables meant to be used in a typoscript-setup? or in the typo3-install-tool?
and whats about t3lib_stdgraphic? in which relation/where is it in action?
Updated by Martin Brulisauer about 17 years ago
I have the problem solved with a HACK in class.t3lib_stdgraphic.php.
In the function ImageTTFTextWrapper(), I convert each char > 127 to the html "&#<ord>" representation.
Line 1032:
if (is_readable($fontFile)) {
// Umlaute HACK
for ($in_text = $strCfg['str'],
$out_text = "",
$tp = 0,
$tl = strlen($in_text);
$tp < $tl;
$tp++) {
if (ord($in_text[$tp]) > 127) {
$out_text .= "&#" . ord($in_text[$tp]) . ";";
} else {
$out_text .= $in_text[$tp];
}
}
// Render part:
ImageTTFText($im, t3lib_div::freetypeDpiComp($sF*$strCfg['fontSize']), $angle, $x, $y, $colorIndex, $fontFile, $out_text);
Dirty hack, I know but the bug is in ImageTTFText(), so hack it or wait for a fixed PHP version.
Updated by Mathis Klooss about 14 years ago
delete this otf file in this Bug-Report...
this is an Commercial Font!
Updated by Stefan Krapf about 14 years ago
Sorry, ich weiss nicht, wie ich den Font löschen kann...
Updated by Chris topher about 14 years ago
You can't. Please write a mail to admin@typo3.org!
Updated by Martin Kutschker about 14 years ago
Deleted on request.MyriadPro-SemiCn.otf by request.
Updated by Steffen Gebert about 14 years ago
As I just had the same issue: Above mentioned hack to convert chars to &#xx didn't work out.
The only thing that helped was to convert the OTF to a TTF (e.g. using onlinefontconverter.com). I can also reproduce the problem with only a tiny PHP file (from http://de2.php.net/ImageTTFText).
So this seems not to be a TYPO3 bug, but a bug somewhere in PHP. If sb. has a suggestion for a workaround, please open a new report.
Updated by Benni Mack almost 6 years ago
- Status changed from Resolved to Closed