PHP GD not rendering unicode fonts properly

前端 未结 2 557
傲寒
傲寒 2021-01-21 12:58

I am having problems in rendering unicode glyphs ( language : Malayalam, Tamil and Hindi) with PHP GD library. Is this something related to the rendering engine of GD library? A

2条回答
  •  执笔经年
    2021-01-21 13:29

    i have found one try this

    setSourceRGB(.1,149,.58);
        $c->paint();
    
        $c->setSourceRGB(.1,.1,.1);
    
        /* Make a Pango layout, set the font, then set the layout size */
        $l = new PangoLayout($c);
        $desc = new PangoFontDescription("mangal normal $fontSize");
        $l->setFontDescription($desc);
    
        /* Here, we use Pango markup to make part of the text bold */
        $l->setText($text);
    
        /* Draw the layout on the surface */
        $l->showLayout($c);
        $s->writeToPng("unicode.png");
        echo $img = "";        
    ?> 
    

提交回复
热议问题