CAIRO_STATUS_WIN32_GDI_ERROR on windows when drawing text
Plugin Everything <[email protected]> Thu, 1 Aug 2019 15:21:50 +1000
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CAM7XvuSWG635zYK446z_pMv3qDJSS+iJk7FkCB5Nb_+nSvXC7Q@mail.gmail.com> |
--===============0033469249==
Content-Type: multipart/alternative; boundary="000000000000d56f27058f076b92"
--000000000000d56f27058f076b92
Content-Type: text/plain; charset="UTF-8"
Hello All
I have a plugin that runs in two host apps, Adobe After Effects and
Premiere Pro. The code works perfectly fine in After Effects, but
frequently returns GDI Error on Premiere despite being the same code.
I posted the issue on the Premiere forums and the mod said *"Yes, my
primary suspect would be Windows font handling. Let me know if you
determine that the problem is with our APIs."* I thought I'd ask on here
first to see if anyone has any experience overcoming such an issue as
google is barren with results relating to the error.
Here's the code:
status = cairo_status(cr);
if (status)
{
statusString = cairo_status_to_string(status);
}
cairo_move_to(cr, x, y);
cairo_show_text(cr, metaDataV.at(i).c_str());
The fonts I tried:
"Arial", "Courier New", "Tahoma", "Times New Roman", "Verdana"
I also tried using the more advanced glyph system however the issue
persisted. Any help would be appreciated. Thank you.
--
*James Whiffin* | *Developer*
www.plugineverything.com
--000000000000d56f27058f076b92
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hello All<div><br></div><div>I have a plugin that runs in =
two host apps, Adobe After Effects and Premiere Pro. The code works perfect=
ly fine in After Effects, but frequently returns GDI Error on Premiere desp=
ite being the same code.=C2=A0</div><div><br></div><div>I posted the issue =
on the Premiere forums and the mod said <i>"Yes, my primary suspect wo=
uld be Windows font handling. Let me know if you determine that the problem=
is with our APIs."</i> I thought I'd ask on here first to see if =
anyone has any experience overcoming such an issue as google is barren with=
results relating to the error.=C2=A0</div><div><br></div><div>Here's t=
he code:</div><div><br></div><div><div style=3D"color:rgb(212,212,212);back=
ground-color:rgb(30,30,30);font-family:Consolas,"Courier New",mon=
ospace;font-size:14px;line-height:19px;white-space:pre"><div>=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0status =3D <span style=3D"color:rgb(220=
,220,170)">cairo_status</span>(cr);</div><br><div>=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0<span style=3D"color:rgb(197,134,192)">if</span> (s=
tatus)</div><div>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{</div><di=
v>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0s=
tatusString =3D <span style=3D"color:rgb(220,220,170)">cairo_status_to_stri=
ng</span>(status);</div><div>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0}</div><br><div>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0<span st=
yle=3D"color:rgb(220,220,170)">cairo_move_to</span>(cr, x, y);</div><div>=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0<span style=3D"color:rgb(22=
0,220,170)">cairo_show_text</span>(cr, <span style=3D"color:rgb(156,220,254=
)">metaDataV</span>.<span style=3D"color:rgb(220,220,170)">at</span>(i).<sp=
an style=3D"color:rgb(220,220,170)">c_str</span>());</div></div></div><div>=
<br></div><div>The fonts I tried:</div><div><br></div><div>"Arial"=
;, "Courier New", "Tahoma", "Times New Roman"=
, "Verdana"<br></div><div><br></div><div>I also tried using the m=
ore advanced glyph system however the issue persisted. Any help would be ap=
preciated. Thank you.<br clear=3D"all"><div><br></div>-- <br><div dir=3D"lt=
r" class=3D"m_-1345044667085465696gmail_signature" data-smartmail=3D"gmail_=
signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><di=
v dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><img src=3D"https://docs.go=
ogle.com/uc?export=3Ddownload&id=3D1EoyYCzhfULnOwxjccMiJxLi1xtaOZCWC&am=
p;revid=3D0Bw1GyPpi-L-hUlpxRGhnMFJLZWNHZHVUSUtSem5YYjg4VU5zPQ" width=3D"200=
" height=3D"24"><br></div><div dir=3D"ltr"><b>James Whiffin</b>=C2=A0|=C2=
=A0<b>Developer</b><table cellpadding=3D"0" cellspacing=3D"0" border=3D"0" =
style=3D"background:none;margin:0px;padding:0px;border:0px;font-stretch:inh=
erit;font-size:16px;line-height:inherit;font-family:proxima-nova,"Helv=
etica Neue",Helvetica,Arial,sans-serif;vertical-align:baseline;border-=
collapse:collapse;border-spacing:0px;color:rgb(85,85,85)"><tbody style=3D"m=
argin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;fo=
nt-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inheri=
t;font-family:inherit;vertical-align:baseline"><tr style=3D"margin:0px;padd=
ing:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inhe=
rit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:=
inherit;vertical-align:baseline"></tr></tbody></table><a href=3D"http://www=
.plugineverything.com/" target=3D"_blank">www.plugineverything.com</a><br><=
br></div></div></div></div></div></div></div></div></div></div></div>
--000000000000d56f27058f076b92--
--===============0033469249==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
LS0gCmNhaXJvIG1haWxpbmcgbGlzdApjYWlyb0BjYWlyb2dyYXBoaWNzLm9yZwpodHRwczovL2xp
c3RzLmNhaXJvZ3JhcGhpY3Mub3JnL21haWxtYW4vbGlzdGluZm8vY2Fpcm8=
--===============0033469249==--