cache->config = FcInitLoadConfigAndFonts();
- assert(!FT_Init_FreeType(&cache->library));
+ FT_CHECK_RESULT(FT_Init_FreeType(&cache->library));
cache->cacheTexLength = FONT_CACHE_INIT_LAYERS;
cache->cacheTex = vkh_tex2d_array_create ((VkhDevice)dev, VK_FORMAT_R8_UNORM, FONT_PAGE_SIZE, FONT_PAGE_SIZE,
char gname[256];
for (int i = 0; i < face->num_glyphs; ++i) {
- assert(!FT_Load_Glyph(face,i,FT_LOAD_RENDER));
+ FT_CHECK_RESULT(FT_Load_Glyph(face,i,FT_LOAD_RENDER));
slot = face->glyph;
FT_Get_Glyph_Name(face,i,gname,256);
}
_char_ref* _prepare_char (VkvgDevice dev, _vkvg_font_t* f, FT_UInt gindex){
- assert(!FT_Load_Glyph(f->face, gindex, FT_LOAD_RENDER));
+ FT_CHECK_RESULT(FT_Load_Glyph(f->face, gindex, FT_LOAD_RENDER));
FT_GlyphSlot slot = f->face->glyph;
FT_Bitmap bmp = slot->bitmap;
nf.fontFile = (char*)calloc(strlen(ctx->selectedFont.fontFile),sizeof(char));
strcpy (nf.fontFile, ctx->selectedFont.fontFile);
- assert(!FT_New_Face(cache->library, nf.fontFile, 0, &nf.face));
- assert(!FT_Set_Char_Size(nf.face, 0, nf.charSize, dev->hdpi, dev->vdpi ));
+ FT_CHECK_RESULT(FT_New_Face(cache->library, nf.fontFile, 0, &nf.face));
+ FT_CHECK_RESULT(FT_Set_Char_Size(nf.face, 0, nf.charSize, dev->hdpi, dev->vdpi ));
nf.hb_font = hb_ft_font_create(nf.face, NULL);
nf.charLookup = (_char_ref**)calloc(nf.face->num_glyphs,sizeof(_char_ref*));
glfwWindowHint(GLFW_DECORATED, GLFW_TRUE);
e->window = glfwCreateWindow (width, height, "Window Title", NULL, NULL);
- VkSurfaceKHR surf;
-
- assert (glfwCreateWindowSurface(e->app->inst, e->window, NULL, &surf)==VK_SUCCESS);
+ VkSurfaceKHR surf;
+ VkResult res = glfwCreateWindowSurface(e->app->inst, e->window, NULL, &surf);
VkhPhyInfo* phys = vkh_app_get_phyinfos (e->app, &phyCount, surf);