~ubuntu-branches/ubuntu/trusty/pango1.0/trusty-proposed

« back to all changes in this revision

Viewing changes to pango/pangocairo-atsuifont.c

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette, Loic Minier, Josselin Mouette
  • Date: 2009-01-06 13:30:54 UTC
  • mfrom: (1.2.57 upstream)
  • Revision ID: james.westby@ubuntu.com-20090106133054-jfrmtlm6rhi32892
Tags: 1.22.4-1
[ Loic Minier ]
* Don't purge /etc/pango/pango.modules during first configuration.

[ Josselin Mouette ]
* New upstream release.
  + Take into account the width of CJK characters when computing the 
    size of text boxes. Closes: #505780.
* 90_relibtoolize.patch: relibtoolize to avoid the rpath issue on 
  amd64.
* dh_pangomodules.in: fix pod2man error.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
#import <Cocoa/Cocoa.h>
26
26
 
 
27
#include "pango-impl-utils.h"
27
28
#include "pangoatsui-private.h"
28
29
#include "pangocairo.h"
29
30
#include "pangocairo-private.h"
148
149
  pango_layout_set_text (layout, sample_str, -1);
149
150
  pango_layout_get_extents (layout, NULL, &extents);
150
151
 
151
 
  metrics->approximate_char_width = extents.width / g_utf8_strlen (sample_str, -1);
 
152
  metrics->approximate_char_width = extents.width / pango_utf8_strwidth (sample_str);
152
153
 
153
154
  pango_layout_set_text (layout, "0123456789", -1);
154
155
  metrics->approximate_digit_width = max_glyph_width (layout);
174
175
static void
175
176
pango_cairo_atsui_font_finalize (GObject *object)
176
177
{
 
178
  PangoCairoATSUIFont *cafont = (PangoCairoATSUIFont *) object;
 
179
 
 
180
  _pango_cairo_font_private_finalize (&cafont->cf_priv);
 
181
 
177
182
  G_OBJECT_CLASS (pango_cairo_atsui_font_parent_class)->finalize (object);
178
183
}
179
184
 
191
196
}
192
197
 
193
198
static void
194
 
pango_cairo_atsui_font_init (PangoCairoATSUIFont *cafont)
 
199
pango_cairo_atsui_font_init (PangoCairoATSUIFont *cafont G_GNUC_UNUSED)
195
200
{
196
201
}
197
202