- tools->plugins->available plugins->checking "Embedded Browser UI - XUL Runner" and "Web Preview"->install
- tools->options->Web Browser->Embedded Mozilla Browser
- click preview
2011年3月8日 星期二
讓netbeans變成網頁編輯器
2011年2月28日 星期一
DevCon 裝置管理員 (command版)
最近因為要測試usb dongle
需要一直插拔
這時候就非常需要devcon
需要一直插拔
這時候就非常需要devcon
devcon remove "USB\VID_0403&PID_6001"
devcon rescan
2011年2月14日 星期一
2011年1月19日 星期三
2011年1月9日 星期日
2011年1月1日 星期六
bdf點陣字(二)
上一個方法,由於bdf檔是即時讀取,所以效能較差。
所以我利用bdf2c產生字型的font.h和font.c檔案
之後只要
#include "font.h"
extern struct bitmap_font font;
就可以使用
如果我要印出A字元(65)
就要找出65在font.Index的位置(pos)
然後資料就是在font.Bitmap的font.Width*font.Height/8*pos的位置
長度則是font.Width*font.Height/8
範例
所以我利用bdf2c產生字型的font.h和font.c檔案
之後只要
#include "font.h"
extern struct bitmap_font font;
就可以使用
struct bitmap_font {
unsigned char Width; //字元最大寬度
unsigned char Height; //字元高度
unsigned short Chars; //總字元數
const unsigned char *Widths; //每個字元的寬度
const unsigned short *Index; //每個字元的索引
const unsigned char *Bitmap; //每個字元的資料
};
舉例如果我要印出A字元(65)
就要找出65在font.Index的位置(pos)
然後資料就是在font.Bitmap的font.Width*font.Height/8*pos的位置
長度則是font.Width*font.Height/8
範例
bdf點陣字
bdf font是文字格式的點陣字型
我是將unifont(unicode bdf font),掃成我定義的bitmap格式
我是將unifont(unicode bdf font),掃成我定義的bitmap格式
1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1111111 1111 11111111111 1 1 1 11111 1
1 1 1 1 1111111 1 1 1 1 1 1
1 1 1 1 1 11 1 1 111 1 1 111
1 1 1 1 1 1 1 1 1 1 1 11111 1
11111111 111111 1111111111 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1111 1 1 1111
1 1 1 1 1 1 1 1111111111 1 11111 1
1111111 1 1 1 1 1 1 1
1 1 1 111111111111111 1 1 1 111111111111111
1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 11 1 11
1 1 1 1 1 1 1 1 11 1 11
1 1 1 1 1 1 11 1
訂閱:
文章 (Atom)





