スクリプト言語の HSP については、公式ホームページの「HSPTV!」をどうぞ。(戻る)
Windows OS 専用の絵文字フォントを閲覧できる簡単なソフトを紹介します。
絵文字フォント思える Marlett、Webdings、Wingdings、Wingdings 2、Wingdings 3 の5つを確認できます。
また、標準的なフォントとしてMSゴシック、MS明朝フォントも確認可能です。
絵文字閲覧ソフトのソース
管理上このサンプルは sample51(絵文字の閲覧ソフト).hsp のソースです。
//------------------------------------------------------------------------------ // 絵文字の閲覧ソフト by 科学太郎 //============================================================================== // 新規作成日:2013-06-24 (月) 15:55:00 // 最終更新日:2013-06-24 (月) 17:18:00 //------------------------------------------------------------------------------ #packopt name __FILE__ //-------------------------------------- // 記号定数 //-------------------------------------- #const GUIDE_SIZE (16) #const IMAGE_SIZE (32) //-------------------------------------- // メイン部 //-------------------------------------- *Init n=-1 n++:fontName(n)="" n++:fontName(n)=MSGOTHIC n++:fontName(n)=MSMINCHO n++:fontName(n)="Marlett" n++:fontName(n)="Webdings" n++:fontName(n)="Wingdings" n++:fontName(n)="Wingdings 2" n++:fontName(n)="Wingdings 3" *Main objsize 80,24 button gosub "既定", *PushView button gosub "MSGOTHIC", *PushView button gosub "MSMINCHO", *PushView button gosub "Marlett", *PushView button gosub "Webdings", *PushView button gosub "Wingdings", *PushView button gosub "Wingdings 2", *PushView button gosub "Wingdings 3", *PushView gosub *PushView stop //-------------------------------------- // ボタン処理 //-------------------------------------- *PushView redraw 0 title strf("絵文字の閲覧ソフト - \"%s\"",fontName(stat)) ViewDraw 96,0,GUIDE_SIZE,IMAGE_SIZE,fontName(stat) redraw 1 return //-------------------------------------- // 絵文字フォント //-------------------------------------- #deffunc ViewDraw int _cx_,int _cy_,int _guide_,int _image_,str _font_ x=(_cx_+_guide_+(_image_-_guide_/2)/2) y=(_cy_+_guide_+(_image_-_guide_/1)/2) color $99,$CC,$00:boxf color $33,$66,$00 font MSGOTHIC,_guide_ // 横文字 repeat 16 pos (_image_*cnt+x),_cy_ mes strf("%X",cnt) loop // 縦文字 repeat 14 pos _cx_,(_image_*cnt+y) mes strf("%X0",cnt+2) loop // 絵文字 font _font_,_image_ color $FF,$CC,$00:BackDraw (_cx_+_guide_),(_cy_+_guide_),_image_ color $CC,$CC,$CC:GridDraw (_cx_+_guide_),(_cy_+_guide_),_image_ color $66,$33,$00:MojiDraw (_cx_+_guide_),(_cy_+_guide_),_image_ return //-------------------------------------- // グリッドの背景 //-------------------------------------- #deffunc BackDraw int _cx_,int _cy_,int _size_ cx=(_cx_) cy=(_cy_) ex=(_cx_+_size_*16) ey=(_cy_+_size_*14) boxf cx,cy,ex,ey return //-------------------------------------- // グリッドの描画 //-------------------------------------- #deffunc GridDraw int _cx_,int _cy_,int _size_ sx=(_size_*16+1) sy=(_size_*14+1) for x,0,sx,_size_ line (_cx_+x),(_cy_+sy),(_cx_+x),_cy_ next for y,0,sy,_size_ line (_cx_+sx),(_cy_+y),_cx_,(_cy_+y) next return //-------------------------------------- // 絵文字の描画 //-------------------------------------- #deffunc MojiDraw int _cx_,int _cy_,int _size_ sdim chr,4 n=$20 repeat 14:y=cnt repeat 16:x=cnt poke chr,0,n pos (_size_*x+_cx_),(_size_*y+_cy_) mes chr n++ loop loop return //------------------------------------------------------------------------------ // End of sample51.hsp //------------------------------------------------------------------------------
※コメント投稿者のブログIDはブログ作成者のみに通知されます