font rendering issue
Ciprian Cudalbu <[email protected]> Fri, 19 Jul 2019 19:17:12 +0000 (UTC)
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
--===============0755822182== Content-Type: multipart/alternative; boundary="----=_Part_3940392_1764244739.1563563832097" ------=_Part_3940392_1764244739.1563563832097 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, cairo version:=C2=A0cairo-1.16.0 hardware: Intel HD 530, Intel UHD 620 with latest open gl drivers (may 2019= ) backend: opengl api:=C2=A0cairo_show_text input: string "ij", in size 33 description: _cairo_scaled_font_glyph_device_extents detects that the glyphs overlap an= d rendering takes the mask path,=C2=A0render_glyphs_via_mask. After doing the mask texture rendering it draws the mask texture into the f= rame buffer 0. It appears that on the intel driverthere is not synchronizat= ion and the texture is used before being ready. This causes garbled output = for text and if a lot of text is drawn the gl backend no longer works. A simple solution is to insert a glFlush just before=C2=A0=C2=A0cairo_surfa= ce_destroy (mask). This takes care of the issue but I am not sure what it d= oes in terms of performance. I hope this info is useful. Best regards,Ciprian Cudalbu. ------=_Part_3940392_1764244739.1563563832097 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <html><head></head><body><div class=3D"yahoo-style-wrap" style=3D"font-fami= ly:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div dir= =3D"ltr" data-setdir=3D"false">Hi,</div><div dir=3D"ltr" data-setdir=3D"fal= se"><br></div><div dir=3D"ltr" data-setdir=3D"false">cairo version: <s= pan>cairo-1.16.0</span></div><div dir=3D"ltr" data-setdir=3D"false"><br></d= iv><div dir=3D"ltr" data-setdir=3D"false">hardware: Intel HD 530, Intel UHD= 620 with latest open gl drivers (may 2019)</div><div dir=3D"ltr" data-setd= ir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"false">backend: open= gl</div><div dir=3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"ltr" d= ata-setdir=3D"false">api: <span>cairo_show_text</span></div><div dir= =3D"ltr" data-setdir=3D"false"><span><br></span></div><div dir=3D"ltr" data= -setdir=3D"false"><span>input: string "ij", in size 33</span></div><div dir= =3D"ltr" data-setdir=3D"false"><span><br></span></div><div dir=3D"ltr" data= -setdir=3D"false"><span>description:</span></div><div dir=3D"ltr" data-setd= ir=3D"false"><span><br></span></div><div dir=3D"ltr" data-setdir=3D"false">= <span>_cairo_scaled_font_glyph_device_extents detects that the glyphs over= lap and rendering takes the mask path, <span>render_glyphs_via_mask.</= span></span><br></div><div dir=3D"ltr" data-setdir=3D"false"><span><span>Af= ter doing the mask texture rendering it draws the mask texture into the fra= me buffer 0. It appears that on the intel driver</span></span></div><div di= r=3D"ltr" data-setdir=3D"false"><span><span>there is not synchronization an= d the texture is used before being ready. This causes garbled output for te= xt and if a lot of text is drawn the gl backend no longer works.</span></sp= an></div><div dir=3D"ltr" data-setdir=3D"false"><span><span><br></span></sp= an></div><div dir=3D"ltr" data-setdir=3D"false"><span><span>A simple soluti= on is to insert a glFlush just before <span> cairo_surface_destro= y (mask). This takes care of the issue but I am not sure what it does in te= rms of performance.</span></span></span></div><div dir=3D"ltr" data-setdir= =3D"false"><span><span><span><br></span></span></span></div><div dir=3D"ltr= " data-setdir=3D"false"><span><span><span>I hope this info is useful.</span= ></span></span></div><div dir=3D"ltr" data-setdir=3D"false"><span><span><sp= an><br></span></span></span></div><div dir=3D"ltr" data-setdir=3D"false"><s= pan><span><span>Best regards,</span></span></span></div><div dir=3D"ltr" da= ta-setdir=3D"false"><span><span><span>Ciprian Cudalbu.</span></span></span>= </div><div dir=3D"ltr" data-setdir=3D"false"><span><span><br></span></span>= </div><div dir=3D"ltr" data-setdir=3D"false"><span><div><br></div><div><br>= </div><div><br></div></span></div><div dir=3D"ltr" data-setdir=3D"false"><s= pan><br></span></div></div></body></html> ------=_Part_3940392_1764244739.1563563832097-- --===============0755822182== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline LS0gCmNhaXJvIG1haWxpbmcgbGlzdApjYWlyb0BjYWlyb2dyYXBoaWNzLm9yZwpodHRwczovL2xp c3RzLmNhaXJvZ3JhcGhpY3Mub3JnL21haWxtYW4vbGlzdGluZm8vY2Fpcm8= --===============0755822182==--