Lines Matching defs:baker

50 /// - Optional font baker and vertex buffer output
3826 3.) Nuklear font baker
3829 want to use it in this library is by using the optional font baker.
3830 The font baker APIs can be used to create a font plus font atlas texture
3834 previously stated still work. The font baker is not located inside
3838 Font baker need to be initialized first by one of the nk_font_atlas_init_xxx
3845 After successfully initializing the font baker you can add Truetype(.ttf) fonts from
3849 the font baker by for example adding additional fonts you can call
3883 The font baker API is probably the most complex API inside this library and
12715 struct nk_font_baker *baker;
12717 /* setup baker inside a memory block */
12718 baker = (struct nk_font_baker*)NK_ALIGN_PTR(memory, nk_baker_align);
12719 baker->build = (struct nk_font_bake_data*)NK_ALIGN_PTR((baker + 1), nk_build_align);
12720 baker->packed_chars = (struct nk_tt_packedchar*)NK_ALIGN_PTR((baker->build + count), nk_char_align);
12721 baker->rects = (struct nk_rp_rect*)NK_ALIGN_PTR((baker->packed_chars + glyph_count), nk_rect_align);
12722 baker->ranges = (struct nk_tt_pack_range*)NK_ALIGN_PTR((baker->rects + glyph_count), nk_range_align);
12723 baker->alloc = *alloc;
12724 return baker;
12727 nk_font_bake_pack(struct nk_font_baker *baker,
12754 /* setup font baker from temporary memory */
12757 do {if (!nk_tt_InitFont(&baker->build[i++].info, (const unsigned char*)it->ttf_blob, 0))
12763 nk_tt_PackBegin(&baker->spc, 0, (int)*width, (int)max_height, 0, 1, alloc);
12777 nk_tt_PackSetOversampling(&baker->spc, 1, 1);
12778 nk_rp_pack_rects((struct nk_rp_context*)baker->spc.pack_info, &custom_space, 1);
12795 struct nk_font_bake_data *tmp = &baker->build[input_i++];
12805 tmp->ranges = baker->ranges + range_n;
12813 tmp->ranges[i].chardata_for_range = baker->packed_chars + char_n;
12818 tmp->rects = baker->rects + rect_n;
12820 nk_tt_PackSetOversampling(&baker->spc, cfg->oversample_h, cfg->oversample_v);
12821 n = nk_tt_PackFontRangesGatherRects(&baker->spc, &tmp->info,
12823 nk_rp_pack_rects((struct nk_rp_context*)baker->spc.pack_info, tmp->rects, (int)n);
12841 nk_font_bake(struct nk_font_baker *baker, void *image_memory, int width, int height,
12854 NK_ASSERT(baker);
12863 baker->spc.pixels = (unsigned char*)image_memory;
12864 baker->spc.height = (int)height;
12869 struct nk_font_bake_data *tmp = &baker->build[input_i++];
12870 nk_tt_PackSetOversampling(&baker->spc, cfg->oversample_h, cfg->oversample_v);
12871 nk_tt_PackFontRangesRenderIntoRects(&baker->spc, &tmp->info, tmp->ranges,
12872 (int)tmp->range_count, tmp->rects, &baker->alloc);
12874 } nk_tt_PackEnd(&baker->spc, &baker->alloc);
12884 struct nk_font_bake_data *tmp = &baker->build[input_i++];
13719 struct nk_font_baker *baker;
13742 /* allocate temporary baker memory required for the baking process */
13749 baker = nk_font_baker(tmp, atlas->glyph_count, atlas->font_num, &atlas->temporary);
13759 if (!nk_font_bake_pack(baker, &img_size, width, height, &atlas->custom,
13770 nk_font_bake(baker, atlas->pixel, *width, *height,