Lines Matching defs:cfg

1096 /// struct nk_convert_config cfg = {};
1103 /// cfg.shape_AA = NK_ANTI_ALIASING_ON;
1104 /// cfg.line_AA = NK_ANTI_ALIASING_ON;
1105 /// cfg.vertex_layout = vertex_layout;
1106 /// cfg.vertex_size = sizeof(struct your_vertex);
1107 /// cfg.vertex_alignment = NK_ALIGNOF(struct your_vertex);
1108 /// cfg.circle_segment_count = 22;
1109 /// cfg.curve_segment_count = 22;
1110 /// cfg.arc_segment_count = 22;
1111 /// cfg.global_alpha = 1.0f;
1112 /// cfg.null = dev->null;
1119 /// nk_convert(&ctx, &cmds, &verts, &idx, &cfg);
3889 struct nk_font_config cfg = nk_font_config(font_pixel_height);
3890 cfg.merge_mode = nk_false or nk_true;
3891 cfg.range = nk_font_korean_glyph_ranges();
3892 cfg.coord_type = NK_COORD_PIXEL;
3893 nk_font *font = nk_font_atlas_add_from_file(&atlas, "Path/To/Your/TTF_Font.ttf", 13, &cfg);
12794 const struct nk_font_config *cfg = it;
12799 for (in_range = cfg->range; in_range[0] && in_range[1]; in_range += 2) {
12809 in_range = &cfg->range[i * 2];
12810 tmp->ranges[i].font_size = cfg->size;
12820 nk_tt_PackSetOversampling(&baker->spc, cfg->oversample_h, cfg->oversample_v);
12868 do {const struct nk_font_config *cfg = it;
12870 nk_tt_PackSetOversampling(&baker->spc, cfg->oversample_h, cfg->oversample_v);
12883 const struct nk_font_config *cfg = it;
12885 struct nk_baked_font *dst_font = cfg->font;
12887 float font_scale = nk_tt_ScaleForPixelHeight(&tmp->info, cfg->size);
12893 if (!cfg->merge_mode) {
12894 dst_font->ranges = cfg->range;
12895 dst_font->height = cfg->size;
12931 if (cfg->coord_type == NK_COORD_PIXEL) {
12942 glyph->xadvance = (pc->xadvance + cfg->spacing.x);
12943 if (cfg->pixel_snap)
13422 struct nk_font_config cfg;
13423 nk_zero_struct(cfg);
13424 cfg.ttf_blob = 0;
13425 cfg.ttf_size = 0;
13426 cfg.ttf_data_owned_by_atlas = 0;
13427 cfg.size = pixel_height;
13428 cfg.oversample_h = 3;
13429 cfg.oversample_v = 1;
13430 cfg.pixel_snap = 0;
13431 cfg.coord_type = NK_COORD_UV;
13432 cfg.spacing = nk_vec2(0,0);
13433 cfg.range = nk_font_default_glyph_ranges();
13434 cfg.merge_mode = 0;
13435 cfg.fallback_glyph = '?';
13436 cfg.font = 0;
13437 cfg.n = 0;
13438 return cfg;
13498 struct nk_font_config *cfg;
13517 cfg = (struct nk_font_config*)
13519 NK_MEMCPY(cfg, config, sizeof(*config));
13520 cfg->n = cfg;
13521 cfg->p = cfg;
13526 atlas->config = cfg;
13527 cfg->next = 0;
13531 i->next = cfg;
13532 cfg->next = 0;
13540 font->config = cfg;
13552 cfg->font = &font->info;
13560 cfg->font = &f->info;
13562 cfg->n = c;
13563 cfg->p = c->p;
13564 c->p->n = cfg;
13565 c->p = cfg;
13569 cfg->ttf_blob = atlas->permanent.alloc(atlas->permanent.userdata,0, cfg->ttf_size);
13570 NK_ASSERT(cfg->ttf_blob);
13571 if (!cfg->ttf_blob) {
13575 NK_MEMCPY(cfg->ttf_blob, config->ttf_blob, cfg->ttf_size);
13576 cfg->ttf_data_owned_by_atlas = 1;
13585 struct nk_font_config cfg;
13598 cfg = (config) ? *config: nk_font_config(height);
13599 cfg.ttf_blob = memory;
13600 cfg.ttf_size = size;
13601 cfg.size = height;
13602 cfg.ttf_data_owned_by_atlas = 0;
13603 return nk_font_atlas_add(atlas, &cfg);
13612 struct nk_font_config cfg;
13624 cfg = (config) ? *config: nk_font_config(height);
13625 cfg.ttf_blob = memory;
13626 cfg.ttf_size = size;
13627 cfg.size = height;
13628 cfg.ttf_data_owned_by_atlas = 1;
13629 return nk_font_atlas_add(atlas, &cfg);
13639 struct nk_font_config cfg;
13660 cfg = (config) ? *config: nk_font_config(height);
13661 cfg.ttf_blob = decompressed_data;
13662 cfg.ttf_size = decompressed_size;
13663 cfg.size = height;
13664 cfg.ttf_data_owned_by_atlas = 1;
13665 return nk_font_atlas_add(atlas, &cfg);