精准字符测绘

所属分类:GDI/图象编程
开发工具:Visual Basic
文件大小:63KB
下载次数:0
上传日期:2020-05-11 14:46:43
上 传 者qweneyu
说明:  VB6&GDI+实现精准中英字符测绘,可自定义行距字距。本人写的试验代码,有大量BUG。测绘之中有少许的浮点误差——这是字体设计单位浮点计算造成的,不可避免. 因为代码中很少注释,我在这里说一下关键:重点是GDI+的DrawDriverString的功能,每个字符需要一个POINTF来定位,该POINTF的原点0,0不是左上角,而是左下角,X=字符左边界,Y(当为0时,实际值为字符行距,需要除以字符设计单位emheight再乘以字体emsize(字体大小,比如10磅)。 字符宽度可以用MeasureDriverString测出,很简单。
(VB6 & GDI + can realize accurate Chinese and English character mapping, and can customize the line spacing. The test code I wrote has a lot of bugs. There are a few floating-point errors in surveying and Mapping - this is caused by floating-point calculation of font design unit, which is inevitable Because there are few comments in the code, let me say the key here: the key is the drawdriverstring function of GDI +. Each character needs a PointF to locate. The origin of the PointF is 0, 0 is not the top left corner, but the bottom left corner. X = the left boundary of the character, y (when it is 0, the actual value is the line spacing of the character, which needs to be divided by the character design unit emheight and multiplied by the font Emsize (font size, such as 10 points). Character width can be measured with measuredriverstring, which is very simple.)

文件列表:
精准字符测绘\ClassWndProc.cls (2400, 2019-05-12)
精准字符测绘\C_GDIPLUS.cls (4318, 2019-05-12)
精准字符测绘\FormNewData.frm (31926, 2019-05-12)
精准字符测绘\GBK库.txt (143104, 2020-05-11)
精准字符测绘\GDI+模块.bas (152430, 2019-05-05)
精准字符测绘\mFormat.bas (1094, 2019-05-12)
精准字符测绘\ModSubClass.bas (821, 2019-05-12)
精准字符测绘\MSSCCPRJ.SCC (193, 2020-05-10)
精准字符测绘\Project1.exe (118784, 2019-05-05)
精准字符测绘\Project1.vbp (918, 2019-05-12)
精准字符测绘\Project1.vbw (217, 2019-05-12)
精准字符测绘 (0, 2020-05-11)

近期下载者

相关文件


收藏者