Re: Finding width of a piece of text
- From: Behdad Esfahbod <behdad behdad org>
- To: Tor Lillqvist <tml iki fi>
- Cc: gtk-list <gtk-list gnome org>
- Subject: Re: Finding width of a piece of text
- Date: Thu, 21 May 2009 04:10:38 -0400
On 05/21/2009 04:00 AM, Tor Lillqvist wrote:
Ah. Please file against cairo at http://bugs.freedesktop.org/
And please attach a complete and minimal sample program (as a single
source file in C or Python) that exhibits the problem. If you have a
suggested patch, that would be greatly appreciated, too.
This line in cairo-win32-font.c looks suspicious:
if (scaled_font->preserve_axes || scaled_font->base.options.hint_metrics
== CAIRO_HINT_METRICS_OFF) {
/* For 90-degree rotations (including 0), we get the metrics
* from the GDI in logical space, then convert back to font space
*/
Sounds like it should read instead:
if (scaled_font->preserve_axes && scaled_font->base.options.hint_metrics
!= CAIRO_HINT_METRICS_OFF) {
/* For 90-degree rotations (including 0), we get the metrics
* from the GDI in logical space, then convert back to font space
*/
Though that's only about font metrics. The code in glyph metrics does what I
suggest.
behdad
--tml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]