]> git.eshelyaron.com Git - emacs.git/commit
Use cairo_scaled_font_t object for text drawing and metrics calculation
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Wed, 17 Apr 2019 00:46:34 +0000 (09:46 +0900)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Wed, 17 Apr 2019 00:46:34 +0000 (09:46 +0900)
commitacec59c9f9c6d552c54ad448f4be898d8ee36f31
tree1711b5e6c8da27cd4df302bcb635ce98d5293724
parent6f8fe0d5acf0aa62a39b274217ac28fc1764840e
Use cairo_scaled_font_t object for text drawing and metrics calculation

* src/ftfont.h (struct font_info): Replace member cr_font_face of type
cairo_font_face_t * with cr_scaled_font of type cairo_scaled_font_t *.
* src/ftcrfont.c: Include math.h for floor, ceiling, and lround.
(ftcrfont_glyph_extents): Use cairo_scaled_font_glyph_extents.
(ftcrfont_open): Create cairo_scaled_font_t object and set it to
cr_scaled_font member of struct font_info.
(ftcrfont_close): Use cairo_scaled_font_destroy.
(ftcrfont_draw): Use cairo_set_scaled_font.
src/ftcrfont.c
src/ftfont.h