Browse Source

text-freetype2: Fix warning about implicit integer downcast

Use Freetype2-specific types which match the types used internally and
returned by Freetype2 functions anyway.
PatTheMav 2 years ago
parent
commit
4e488e2f1a
2 changed files with 2 additions and 2 deletions
  1. 1 1
      plugins/text-freetype2/find-font.c
  2. 1 1
      plugins/text-freetype2/text-freetype2.h

+ 1 - 1
plugins/text-freetype2/find-font.c

@@ -226,7 +226,7 @@ static void create_bitmap_sizes(struct font_path_info *info, FT_Face face)
 	da_reserve(sizes, face->num_fixed_sizes);
 
 	for (int i = 0; i < face->num_fixed_sizes; i++) {
-		int val = face->available_sizes[i].size >> 6;
+		FT_Pos val = face->available_sizes[i].size >> 6;
 		da_push_back(sizes, &val);
 	}
 

+ 1 - 1
plugins/text-freetype2/text-freetype2.h

@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 struct glyph_info {
 	float u, v, u2, v2;
 	int32_t w, h, xoff, yoff;
-	int32_t xadv;
+	FT_Pos xadv;
 };
 
 struct ft2_source {