{"id":11162,"date":"2022-01-28T22:46:51","date_gmt":"2022-01-28T14:46:51","guid":{"rendered":"https:\/\/www.bookcard.net\/wordpress\/?p=11162"},"modified":"2022-01-28T22:46:51","modified_gmt":"2022-01-28T14:46:51","slug":"android_studio_ndk_opengl_es_bitmap_fontex","status":"publish","type":"post","link":"https:\/\/www.bookcard.net\/wordpress\/android_studio_ndk_opengl_es_bitmap_fontex\/","title":{"rendered":"Android Studio NDK-OpenGL ES \u6f22\u5b57\u4f4d\u5716\u5b57\u5eab"},"content":{"rendered":"<figure id=\"attachment_11164\" aria-describedby=\"caption-attachment-11164\" style=\"width: 1280px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2022\/01\/Android_Studio_NDK_OpenGL_ES_Bitmap_FontEx.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-11164\" src=\"https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2022\/01\/Android_Studio_NDK_OpenGL_ES_Bitmap_FontEx.jpg\" alt=\"Android Studio NDK-OpenGL ES \u6f22\u5b57\u4f4d\u5716\u5b57\u5eab\" width=\"1280\" height=\"800\" srcset=\"https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2022\/01\/Android_Studio_NDK_OpenGL_ES_Bitmap_FontEx.jpg 1280w, https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2022\/01\/Android_Studio_NDK_OpenGL_ES_Bitmap_FontEx-300x188.jpg 300w, https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2022\/01\/Android_Studio_NDK_OpenGL_ES_Bitmap_FontEx-768x480.jpg 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/a><figcaption id=\"caption-attachment-11164\" class=\"wp-caption-text\">Android Studio NDK-OpenGL ES \u6f22\u5b57\u4f4d\u5716\u5b57\u5eab<\/figcaption><\/figure>\n<p>\u300e\u6f22\u5b57\u5b57\u5eab\u300f\u540c \u300e<a href=\"https:\/\/www.bookcard.net\/wordpress\/android_studio_ndk_opengl_es_bitmap_font\/\">ASCII\u5b57\u5eab<\/a>\u300f\u539f\u7406\u540c, \u5b57\u5eab\u300e\u7aea\u6392\u300f, \u6f22\u5b57\u300e32*32\u300fpixel, \u300e\u7aea\u300f32\u6f22\u5b57.<\/p>\n<p>\u7531\u4e0a\u81f3\u4e0b,\u7531\u53f3\u81f3\u5de6\u6392\u5217.\u53ef\u586b1024\u5b57\u7b26,\u6bcf\u82728Bit. \u5373\u300e\u7d22\u5f15\u8272\u300f\u300e\u8abf\u8272\u677f\u300f.<\/p>\n<p>\u51c6\u5099\u5eab\u4f4d\u5716<\/p>\n<ol>\n<li>\u767d\u7d19\u9ed1\u5b57,<\/li>\n<li>\u767d\u8272\u4fc2\u900f\u660e\u8272. \u9ed1\u8272\u4fc2\u8b8a\u63db\u8272.<\/li>\n<\/ol>\n<p>Photoshop\u8f49\u70ba\u300e\u7d22\u5f15\u8272\u300f<\/p>\n<ol>\n<li>\u300e\u5f71\u50cf\u300f-&gt;\u300e\u6a21\u8272\u300f-&gt;\u300e\u7d22\u5f15\u8272\u300f<\/li>\n<li>\u300e\u8272\u76e4\u300f\u63c0\u300e\u6b63\u78ba\u300f.<\/li>\n<li>\u300e\u984f\u8272\u300f\u91cf3<\/li>\n<li>\u300e\u5f3a\u5236\u300f\u63c0\u300e\u9ed1\u767d\u300f<\/li>\n<li>\u300e\u900f\u660e\u300f\u52fe\u9078<\/li>\n<li>\u5b58\u70ba\u300e.pcx\u300f\u6216\u300e.bmp\u300f<\/li>\n<\/ol>\n<p>\u6b62\u6642\u5716\u6a94\u300e\u8abf\u8272\u677f\u300f\u5171\u6709\u4e09\u8272\u300e\u9ed1\u300f\u300e\u767d\u300f\u300e\u900f\u660e\u300f.<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"288\">IMAGE-SIZE<\/td>\n<td width=\"288\">1024*1024<\/td>\n<\/tr>\n<tr>\n<td width=\"288\">FONT-SIZE<\/td>\n<td width=\"288\">30pt<\/td>\n<\/tr>\n<tr>\n<td width=\"288\">FONT<\/td>\n<td width=\"288\"><a href=\"https:\/\/www.bookcard.net\/wordpress\/kouzanmouhitufont\/\">\u8861\u5c71\u6bdb\u7b46\u30d5\u30a9\u30f3\u30c8<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"288\">FONT-PIXEL<\/td>\n<td width=\"288\">32pixel*32pixel<\/td>\n<\/tr>\n<tr>\n<td width=\"288\">\u5f71\u50cf-\u6a21\u8272<\/td>\n<td width=\"288\">\u7d22\u5f15\u8272<\/td>\n<\/tr>\n<tr>\n<td width=\"288\">\u8272\u76e4<\/td>\n<td width=\"288\">\u6b63\u78ba<\/td>\n<\/tr>\n<tr>\n<td width=\"288\">\u984f\u8272<\/td>\n<td width=\"288\">3<\/td>\n<\/tr>\n<tr>\n<td width=\"288\">\u5f3a\u5236<\/td>\n<td width=\"288\">\u9ed1\u767d<\/td>\n<\/tr>\n<tr>\n<td width=\"288\">\u900f\u660e<\/td>\n<td width=\"288\">\u52fe\u9078<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u300e\u8abf\u8272\u677f\u300f\u7d50\u6784\u540cDirextX\u5514\u540c, \u5c07flags\u5b58alpha\u300e\u900f\u660e\u503c\u300f0~255,0\u4fc2\u300e\u900f\u660e\u300f,255\u4fc2\u300e\u5be6\u5fc3\u300f<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"575\">typedef struct PALETTE_TYP {<\/p>\n<p>BYTE red;<\/p>\n<p>BYTE green;<\/p>\n<p>BYTE blue;<\/p>\n<p>BYTE flags;\/\/alpha<\/p>\n<p>} PALETTE,COLOR,* PALETTE_PTR,*COLOR_PTR;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8a2d\u7f6e\u300e\u8abf\u8272\u677f\u300f\u984f\u8272<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"575\">#define INIT_PALETTE(palette,r,g,b,a) {(palette).red=(r); (palette).green=(g); (palette).blue=(b); (palette).flags=(a);}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9ed1\u5b57\u300e\u8abf\u8272\u677f\u300f\u8a2d\u7f6e<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"115\">index<\/td>\n<td width=\"115\">red<\/td>\n<td width=\"115\">green<\/td>\n<td width=\"115\">blue<\/td>\n<td width=\"115\">Alpha<\/td>\n<\/tr>\n<tr>\n<td width=\"115\">253<\/td>\n<td width=\"115\">0xff<\/td>\n<td width=\"115\">0xff<\/td>\n<td width=\"115\">0xff<\/td>\n<td width=\"115\">0x00<\/td>\n<\/tr>\n<tr>\n<td width=\"115\">255<\/td>\n<td width=\"115\">0x00<\/td>\n<td width=\"115\">0x00<\/td>\n<td width=\"115\">0x00<\/td>\n<td width=\"115\">0xFF*0.5f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u767d\u5b57\u300e\u8abf\u8272\u677f\u300f\u8a2d\u7f6e<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"115\">index<\/td>\n<td width=\"115\">red<\/td>\n<td width=\"115\">green<\/td>\n<td width=\"115\">blue<\/td>\n<td width=\"115\">Alpha<\/td>\n<\/tr>\n<tr>\n<td width=\"115\">253<\/td>\n<td width=\"115\">0x00<\/td>\n<td width=\"115\">0x00<\/td>\n<td width=\"115\">0x00<\/td>\n<td width=\"115\">0x00<\/td>\n<\/tr>\n<tr>\n<td width=\"115\">255<\/td>\n<td width=\"115\">0xff<\/td>\n<td width=\"115\">0xff<\/td>\n<td width=\"115\">0xff<\/td>\n<td width=\"115\">0xFF*0.5f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u534a\u900f\u660e,\u6fc0\u6d3b\u6df7\u5408<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"575\">glEnable(GL_BLEND);<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8a2d\u6df7\u5408\u6a21\u5f0f, \u6e32\u67d3\u6642Alpha\u503c\u6df7\u5408.<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"575\">glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6fc0\u6d3b\u900f\u660e\u6d4b\u8bd5<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"575\">glEnable(GL_ALPHA_TEST);<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Alpha=0\u6642, \u904e\u6ffe\u80cc\u5f71\u8272<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"575\">glAlphaFunc(GL_GREATER, 0);<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u300e\u6f22\u5b57\u5b57\u5eab\u300f\u540c \u300eASCII\u5b57\u5eab\u300f\u539f\u7406\u540c, \u5b57\u5eab\u300e\u7aea\u6392\u300f, \u6f22\u5b57\u300e32*32\u300fpixel, \u300e\u7aea\u300f32\u6f22\u5b57.  &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.bookcard.net\/wordpress\/android_studio_ndk_opengl_es_bitmap_fontex\/\" class=\"more-link\">\u7e7c\u7e8c\u95b1\u8b80 <span class=\"screen-reader-text\">Android Studio NDK-OpenGL ES \u6f22\u5b57\u4f4d\u5716\u5b57\u5eab<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,62],"tags":[2,50],"class_list":["post-11162","post","type-post","status-publish","format-standard","hentry","category-android","category-opengl","tag-android","tag-opengl","entry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts\/11162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/comments?post=11162"}],"version-history":[{"count":1,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts\/11162\/revisions"}],"predecessor-version":[{"id":11165,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts\/11162\/revisions\/11165"}],"wp:attachment":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/media?parent=11162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/categories?post=11162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/tags?post=11162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}