Project

General

Profile

Actions

Bug #16759

closed

incorrect rendering of umlauts with opentype fonts...

Added by Stefan Krapf almost 18 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Communication
Target version:
-
Start date:
2006-12-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
5
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

fehler-nummer 18446.gif (733 Bytes) fehler-nummer 18446.gif Administrator Admin, 2006-12-04 03:33

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #17046: Umlauts not working in GIFBUILDER with php5Closed2007-02-27

Actions
Related to TYPO3 Core - Feature #19326: Render text with TrueType font: Add some special chars to the test textRejected2008-09-15

Actions
Actions #1

Updated by Michael Stucki almost 18 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.

Actions #2

Updated by Martin Kutschker almost 18 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.

Actions #3

Updated by Stefan Krapf almost 18 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?

Actions #4

Updated by Martin Brulisauer over 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.

Actions #5

Updated by Mathis Klooss over 14 years ago

delete this otf file in this Bug-Report...
this is an Commercial Font!

Actions #6

Updated by Stefan Krapf over 14 years ago

Sorry, ich weiss nicht, wie ich den Font löschen kann...

Actions #7

Updated by Chris topher over 14 years ago

You can't. Please write a mail to !

Actions #8

Updated by Martin Kutschker over 14 years ago

Deleted on request.MyriadPro-SemiCn.otf by request.

Actions #9

Updated by Steffen Gebert over 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.

Actions #10

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF