Re: Patch for cairo-win32-font.c, when GetTextMetrics fails

Adrian Johnson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On 10/11/15 01:48, Patrick Fritzsch wrote:
> Hello,
> 
>  
> 
> attached is a patch for cairo-win32-font.c, which fixed an issue with a
> problematic font on windows I had during printing a pdf document on
> cairo (not using poppler).

I've committed the patch (with some white space fixes).

> When Cairo fails internally for any reason it set sets an error code
> inside the context – and all content later, which i want to output on
> this context isn’t processed anymore. In above case it works, that I
> ignore that error-setting and process the rest of the document.
> 
> So how can I achieve, that when I left the erroneous state inside the
> context, that it works again? I miss something like a cairo_reset_error
> function.

It is not possible. It is assumed that win32 fonts used with the win32
font backend are valid fonts that work with windows. If you are using
embedded fonts you may be better off using the freetype font backend as
freetype is more tolerant of incomplete fonts.

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.