From 8e7250eb7a657b6e36ae0db66370257aaf9e1181 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 11 Jan 2017 12:09:19 +0530 Subject: [PATCH] Use undeprecated orientation constant --- kitty/core_text.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty/core_text.m b/kitty/core_text.m index 7a9545b3e..f9542e6af 100644 --- a/kitty/core_text.m +++ b/kitty/core_text.m @@ -128,7 +128,7 @@ cell_size(Face *self) { unsigned int width = 0, w; for (int i = 0; i < count; i++) { if (glyphs[i]) { - CTFontGetAdvancesForGlyphs(self->font, kCTFontHorizontalOrientation, glyphs+1, advances, 1); + CTFontGetAdvancesForGlyphs(self->font, kCTFontOrientationHorizontal, glyphs+1, advances, 1); w = (unsigned int)(ceilf(advances[0].width)); if (w > width) width = w; } @@ -168,7 +168,7 @@ render_char(Face *self, PyObject *args) { CGContextSetTextDrawingMode(ctx, kCGTextFill); CGGlyph glyph = glyphs[0]; if (glyph) { - CGRect rect = CTFontGetBoundingRectsForGlyphs(font, kCTFontHorizontalOrientation, glyphs, 0, 1); + CGRect rect = CTFontGetBoundingRectsForGlyphs(font, kCTFontOrientationHorizontal, glyphs, 0, 1); // TODO: Scale the glyph if its bbox is larger than the image by using a non-identity transform CGContextSetTextMatrix(ctx, transform); CGFloat pos_x = -rect.origin.x + 1, pos_y = height - rect.origin.y - rect.size.height;