Lines Matching defs:info

560 /// __font__    | Must point to a previously initialized font handle for more info look at font documentation
586 /// __font__ | Must point to a previously initialized font handle for more info look at font documentation
604 /// __font__ | Must point to a previously initialized font handle for more info look at font documentation
623 /// __font__ | Must point to a previously initialized font handle for more info look at font documentation
3924 /* font glyph callback to query drawing info */
3996 struct nk_baked_font info;
11096 NK_INTERN int nk_tt_GetGlyphShape(const struct nk_tt_fontinfo *info, struct nk_allocator *alloc,
11114 nk_tt_InitFont(struct nk_tt_fontinfo *info, const unsigned char *data2, int fontstart)
11120 info->data = data;
11121 info->fontstart = fontstart;
11124 info->loca = (int)nk_tt__find_table(data, (nk_uint)fontstart, "loca"); /* required */
11125 info->head = (int)nk_tt__find_table(data, (nk_uint)fontstart, "head"); /* required */
11126 info->glyf = (int)nk_tt__find_table(data, (nk_uint)fontstart, "glyf"); /* required */
11127 info->hhea = (int)nk_tt__find_table(data, (nk_uint)fontstart, "hhea"); /* required */
11128 info->hmtx = (int)nk_tt__find_table(data, (nk_uint)fontstart, "hmtx"); /* required */
11129 info->kern = (int)nk_tt__find_table(data, (nk_uint)fontstart, "kern"); /* not required */
11130 if (!cmap || !info->loca || !info->head || !info->glyf || !info->hhea || !info->hmtx)
11134 if (t) info->numGlyphs = nk_ttUSHORT(data+t+4);
11135 else info->numGlyphs = 0xffff;
11141 info->index_map = 0;
11152 info->index_map = (int)(cmap + nk_ttULONG(data+encoding_record+4));
11159 info->index_map = (int)(cmap + nk_ttULONG(data+encoding_record+4));
11164 if (info->index_map == 0)
11166 info->indexToLocFormat = nk_ttUSHORT(data+info->head + 50);
11170 nk_tt_FindGlyphIndex(const struct nk_tt_fontinfo *info, int unicode_codepoint)
11172 const nk_byte *data = info->data;
11173 nk_uint index_map = (nk_uint)info->index_map;
11272 nk_tt__GetGlyfOffset(const struct nk_tt_fontinfo *info, int glyph_index)
11275 if (glyph_index >= info->numGlyphs) return -1; /* glyph index out of range */
11276 if (info->indexToLocFormat >= 2) return -1; /* unknown index->glyph map format */
11278 if (info->indexToLocFormat == 0) {
11279 g1 = info->glyf + nk_ttUSHORT(info->data + info->loca + glyph_index * 2) * 2;
11280 g2 = info->glyf + nk_ttUSHORT(info->data + info->loca + glyph_index * 2 + 2) * 2;
11282 g1 = info->glyf + (int)nk_ttULONG (info->data + info->loca + glyph_index * 4);
11283 g2 = info->glyf + (int)nk_ttULONG (info->data + info->loca + glyph_index * 4 + 4);
11288 nk_tt_GetGlyphBox(const struct nk_tt_fontinfo *info, int glyph_index,
11291 int g = nk_tt__GetGlyfOffset(info, glyph_index);
11294 if (x0) *x0 = nk_ttSHORT(info->data + g + 2);
11295 if (y0) *y0 = nk_ttSHORT(info->data + g + 4);
11296 if (x1) *x1 = nk_ttSHORT(info->data + g + 6);
11297 if (y1) *y1 = nk_ttSHORT(info->data + g + 8);
11317 nk_tt_GetGlyphShape(const struct nk_tt_fontinfo *info, struct nk_allocator *alloc,
11322 const nk_byte *data = info->data;
11325 int g = nk_tt__GetGlyfOffset(info, glyph_index);
11498 comp_num_verts = nk_tt_GetGlyphShape(info, alloc, gidx, &comp_verts);
11540 nk_tt_GetGlyphHMetrics(const struct nk_tt_fontinfo *info, int glyph_index,
11543 nk_ushort numOfLongHorMetrics = nk_ttUSHORT(info->data+info->hhea + 34);
11546 *advanceWidth = nk_ttSHORT(info->data + info->hmtx + 4*glyph_index);
11548 *leftSideBearing = nk_ttSHORT(info->data + info->hmtx + 4*glyph_index + 2);
11551 *advanceWidth = nk_ttSHORT(info->data + info->hmtx + 4*(numOfLongHorMetrics-1));
11553 *leftSideBearing = nk_ttSHORT(info->data + info->hmtx + 4*numOfLongHorMetrics + 2*(glyph_index - numOfLongHorMetrics));
11557 nk_tt_GetFontVMetrics(const struct nk_tt_fontinfo *info,
11560 if (ascent ) *ascent = nk_ttSHORT(info->data+info->hhea + 4);
11561 if (descent) *descent = nk_ttSHORT(info->data+info->hhea + 6);
11562 if (lineGap) *lineGap = nk_ttSHORT(info->data+info->hhea + 8);
11565 nk_tt_ScaleForPixelHeight(const struct nk_tt_fontinfo *info, float height)
11567 int fheight = nk_ttSHORT(info->data + info->hhea + 4) - nk_ttSHORT(info->data + info->hhea + 6);
11571 nk_tt_ScaleForMappingEmToPixels(const struct nk_tt_fontinfo *info, float pixels)
11573 int unitsPerEm = nk_ttUSHORT(info->data + info->head + 18);
12231 nk_tt_MakeGlyphBitmapSubpixel(const struct nk_tt_fontinfo *info, unsigned char *output,
12237 int num_verts = nk_tt_GetGlyphShape(info, alloc, glyph, &vertices);
12240 nk_tt_GetGlyphBitmapBoxSubpixel(info, glyph, scale_x, scale_y, shift_x,
12444 struct nk_tt_fontinfo *info, struct nk_tt_pack_range *ranges,
12453 float scale = (fh > 0) ? nk_tt_ScaleForPixelHeight(info, fh):
12454 nk_tt_ScaleForMappingEmToPixels(info, -fh);
12463 int glyph = nk_tt_FindGlyphIndex(info, codepoint);
12464 nk_tt_GetGlyphBitmapBoxSubpixel(info,glyph, scale * (float)spc->h_oversample,
12475 struct nk_tt_fontinfo *info, struct nk_tt_pack_range *ranges,
12489 float scale = fh > 0 ? nk_tt_ScaleForPixelHeight(info, fh):
12490 nk_tt_ScaleForMappingEmToPixels(info, -fh);
12511 int glyph = nk_tt_FindGlyphIndex(info, codepoint);
12520 nk_tt_GetGlyphHMetrics(info, glyph, &advance, &lsb);
12521 nk_tt_GetGlyphBitmapBox(info, glyph, scale * (float)spc->h_oversample,
12523 nk_tt_MakeGlyphBitmapSubpixel(info, spc->pixels + r->x + r->y*spc->stride_in_bytes,
12593 struct nk_tt_fontinfo info;
12757 do {if (!nk_tt_InitFont(&baker->build[i++].info, (const unsigned char*)it->ttf_blob, 0))
12821 n = nk_tt_PackFontRangesGatherRects(&baker->spc, &tmp->info,
12871 nk_tt_PackFontRangesRenderIntoRects(&baker->spc, &tmp->info, tmp->ranges,
12887 float font_scale = nk_tt_ScaleForPixelHeight(&tmp->info, cfg->size);
12889 nk_tt_GetFontVMetrics(&tmp->info, &unscaled_ascent, &unscaled_descent,
13021 scale = height/font->info.height;
13056 scale = height/font->info.height;
13077 NK_ASSERT(font->info.ranges);
13108 font->info = baked;
13109 font->scale = (float)pixel_height / (float)font->info.height;
13115 font->handle.height = font->info.height * font->scale;
13552 cfg->font = &font->info;
13560 cfg->font = &f->info;
21838 /* find the x/y location of a character, and remember info about the previous