void MCSystemListFontsForFamily(MCExecPoint& ep, const char *p_family) { uint32_t t_styles; t_styles = 0; for (uint32_t i = 0; s_droid_fonts[i].name != nil; i++) { if (MCCStringEqualCaseless(s_droid_fonts[i].name, p_family)) { t_styles = s_droid_fonts[i].styles; break; } } if (t_styles == 0) t_styles = MCAndroidCustomFontsGetStyle(p_family); ep . clear(); if (t_styles & kMCAndroidFontStyleRegular) ep.concatcstring("plain", EC_RETURN, ep.getsvalue().getlength() == 0); if (t_styles & kMCAndroidFontStyleBold) ep.concatcstring("bold", EC_RETURN, ep.getsvalue().getlength() == 0); if (t_styles & kMCAndroidFontStyleItalic) ep.concatcstring("italic", EC_RETURN, ep.getsvalue().getlength() == 0); if (t_styles & kMCAndroidFontStyleBoldItalic) ep.concatcstring("bold-italic", EC_RETURN, ep.getsvalue().getlength() == 0); }
void MCOldFontlist::getfontstyles(const char *fname, uint2 fsize, MCExecPoint &ep) { ep.clear(); if (MCnoui) return; MCOldFontnode dummynode; dummynode.buildtable(); MCOldFonttablenode *fnptr = dummynode.findtablenode(fname); if (fnptr != NULL) { uint2 i; for (i = 0 ; i < fnptr->nplain ; i++) { if (fnptr->psizes[i] == 0 || fnptr->psizes[i] == fsize) { ep.concatcstring(MCplainstring, EC_RETURN, true); if (fnptr->nbold > i && (fnptr->bsizes[i] == 0 || fnptr->bsizes[i] == fsize)) ep.concatcstring("bold", EC_RETURN, false); if (fnptr->nitalic > i && (fnptr->isizes[i] == 0 || fnptr->isizes[i] == fsize)) ep.concatcstring("italic", EC_RETURN, false); if (fnptr->nbolditalic > i && (fnptr->bisizes[i] == 0 || fnptr->bisizes[i] == fsize)) ep.concatcstring("bold-italic", EC_RETURN, false); break; } } } }
void MCSystemListFontFamilies(MCExecPoint& ep) { ep . clear(); for (uint32_t i = 0; s_droid_fonts[i].name != nil; i++) ep.concatcstring(s_droid_fonts[i].name, EC_RETURN, ep.getsvalue().getlength() == 0); char *t_custom_font_names; t_custom_font_names = nil; MCAndroidCustomFontsList(t_custom_font_names); if (t_custom_font_names != nil) ep.concatcstring(t_custom_font_names, EC_RETURN, ep.getsvalue().getlength() == 0); /*UNCHECKED */ MCCStringFree(t_custom_font_names); }
static HRESULT append_shellitem_path_and_release(MCExecPoint& ep, IShellItem *p_item, bool p_first) { HRESULT t_hresult; t_hresult = S_OK; bool t_succeeded; t_succeeded = true; WCHAR *t_filename; t_filename = NULL; if (t_succeeded) { t_hresult = p_item -> GetDisplayName(SIGDN_FILESYSPATH, &t_filename); t_succeeded = SUCCEEDED(t_hresult); } if (t_succeeded) { char *t_rev_filename; t_rev_filename = strdup(AnsiCString(t_filename)); MCU_path2std(t_rev_filename); ep.concatcstring(t_rev_filename, EC_RETURN, p_first); delete[] t_rev_filename; } if (t_filename != NULL) CoTaskMemFree(t_filename); if (p_item != NULL) p_item -> Release(); return t_hresult; }
Exec_stat MCFontListLoaded(MCExecPoint& ep) { ep.clear(); for(MCLoadedFont *t_font = s_loaded_fonts; t_font != nil; t_font = t_font -> next) ep.concatcstring(t_font -> path, EC_RETURN, t_font == s_loaded_fonts); return ES_NORMAL; }
//list ciphers and default key lengths for each void list_ciphers_cb(const OBJ_NAME *name,void *buffer) { if(!islower((unsigned char)*name->name)) return; MCExecPoint *ep = (MCExecPoint *)buffer; if (*name->name) { ep->concatcstring(name->name,EC_RETURN,isfirstcipher); isfirstcipher = false; const EVP_CIPHER *cipher=EVP_get_cipherbyname(name->name); if (cipher) ep->concatuint(EVP_CIPHER_key_length(cipher) * 8, EC_COMMA, false); } }
void MCOldFontlist::getfontnames(MCExecPoint &ep, char *type) { ep.clear(); if (MCnoui) return; MCOldFontnode dummynode; dummynode.buildtable(); MCOldFonttablenode *table = dummynode.gettable(); MCOldFonttablenode *tmp = table; do { ep.concatcstring(tmp->name, EC_RETURN, tmp == table); tmp = tmp->next; } while (tmp != NULL); }
Exec_stat MCF_unparsetextatts(Properties which, MCExecPoint &ep, uint4 flags, const char *name, uint2 height, uint2 size, uint2 style) { switch (which) { case P_TEXT_ALIGN: switch (flags & F_ALIGNMENT) { case F_ALIGN_LEFT: ep.setstaticcstring(MCleftstring); break; case F_ALIGN_CENTER: ep.setstaticcstring(MCcenterstring); break; case F_ALIGN_RIGHT: ep.setstaticcstring(MCrightstring); break; case F_ALIGN_JUSTIFY: ep.setstaticcstring(MCjustifystring); break; } break; case P_TEXT_FONT: ep.setsvalue(name); break; case P_TEXT_HEIGHT: ep.setint(height); break; case P_TEXT_SIZE: ep.setint(size); break; case P_TEXT_STYLE: { if (style == FA_DEFAULT_STYLE) { ep.setstaticcstring(MCplainstring); return ES_NORMAL; } uint32_t j; j = 0; ep.clear(); if (MCF_getweightint(style) != MCFW_MEDIUM) ep.concatcstring(MCF_getweightstring(style), EC_COMMA, j++ == 0); if (style & FA_ITALIC || style & FA_OBLIQUE) ep.concatcstring(MCF_getslantlongstring(style), EC_COMMA, j++ == 0); if (style & FA_BOX) ep.concatcstring(MCboxstring, EC_COMMA, j++ == 0); if (style & FA_3D_BOX) ep.concatcstring(MCthreedboxstring, EC_COMMA, j++ == 0); if (style & FA_UNDERLINE) ep.concatcstring(MCunderlinestring, EC_COMMA, j++ == 0); if (style & FA_STRIKEOUT) ep.concatcstring(MCstrikeoutstring, EC_COMMA, j++ == 0); if (style & FA_LINK) ep.concatcstring(MClinkstring, EC_COMMA, j++ == 0); if (MCF_getexpandint(style) != FE_NORMAL) ep.concatcstring(MCF_getexpandstring(style), EC_COMMA, j++ == 0); } break; default: break; } return ES_NORMAL; }