+int render(int charcode, int size) __attribute__((section(".text")));
+int render(int charcode, int size) {
+ int glyph_index;
+
+ FT_Check(FT_Set_Char_Size(face, 0, size * 64, 72, 72));
+
+ glyph_index = FT_Get_Char_Index(face, charcode);
+ FT_Check(FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT | FT_LOAD_FORCE_AUTOHINT));
+ FT_Check(FT_Render_Glyph(face->glyph, FT_RENDER_MODE_NORMAL));
+
+ user_info[0] = (int)face->glyph->bitmap.buffer;
+ user_info[1] = face->glyph->bitmap.width;
+ user_info[2] = face->glyph->bitmap.rows;
+ user_info[3] = face->size->metrics.ascender >> 6;
+ user_info[4] = (-1 * face->size->metrics.descender) >> 6;
+ user_info[5] = face->glyph->metrics.horiBearingY >> 6;
+ user_info[6] = face->glyph->advance.x >> 6;
+
+ pathlen = 0; current_x = 0; current_y = 0;
+ FT_Outline_Decompose(&face->glyph->outline, &buildPath, NULL);
+ path[pathlen++] = 'z';
+ path[pathlen++] = ' ';
+ path[pathlen++] = 'm';
+ path[pathlen++] = ' ';
+ append(0, 0);
+ path[pathlen++] = ' ';
+ user_info[7] = (int)&path;
+ user_info[8] = pathlen;
+}