资源简介
c语言实现,利用了移位等操作。是利用区位码在打开文件中进行寻找,输出改字,在此基础上 可以实现斜体、加粗等操作。

代码片段和文件信息
#include
// 显示点阵汉字图形
void ShowImage(unsigned char high unsigned char low FILE *f);
void show(unsigned char x);
int main()
{
char high low;
scanf(“ %c%c“ &high &low);
FILE *f = fopen(“HZK16.DAT“ “rb“);
if (f)
{
ShowImage(high low f);
fclose(f);
}
return 0;
}
void ShowImage(unsigned char high unsigned char low FILE *f)
{
unsigned char a[32];
unsigned char t = 0x80;
int row = 0 col = 0;
int pos = 0i = 0;
row = high - 160;
col = low - 160;
pos = 32 * ((row - 1) * 94 + (col - 1)); //计算汉字在点阵字库(16点阵)中的偏移量的方法:(GB2312标准字库)
fseek(f pos SEEK_SET);
fread(a sizeof(char) 32 f);
for(i; i < 16; ++i)
{
while(t)
{
printf(a[i * 2] & t ? “■“ : “□“);
t >>= 1;
}
t = 0x80;
while(t)
{
printf(a[i * 2 +1] & t ? “■“ : “□“);
t >>= 1;
}
putchar(‘\n‘);
t = 0x80;
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-09-14 15:55 汉字点阵图\
文件 267616 2018-08-13 14:32 汉字点阵图\HZK16.DAT
文件 927 2018-08-13 16:08 汉字点阵图\t1.c
相关资源
- stc8g1k08特性.doc
- 基于单片机的交通灯设计.doc
- C语言的嵌入式汇编基本使用.docx(2页
- Arduino 敲琴MIDI电子琴 程序报告.docx
- 新编Windows API参考大全.doc
- 实验报告:数据结构长整数四则运算
- LabwindowsCVI 串口编程及事例.docx
- 2015西北大学计算机复试回忆(附机试
- 西北大学2015年计算机网络复试真题回
- 人工蜂群算法.docx
- 成绩管理系统.doc
- C++ sql2008 WebServer通讯.docx
- 约瑟夫环问题.docx
- 计算机二级C语言真题.docx
- 04737C++ 程序设计精华.docx
- C基础讲义2018修订版.doc
- c++知识点总结.doc
- C语言程序设计50例.docx
- 8位竞赛抢答器的课程设计报告.docx
- C语言程序设计教材习题参考答案.do
- C语言编译器的设计与实现.doc
- C++快速入门.doc
- c++小游戏源码.doc
- canape教程(ape.docx)
- Arduino-LM35-LCD1602数字温度计实验.doc
- 基于空调项目的Autosar 架构的设计.d
- 数据结构各种算法实现(C++模板),
- 《水果忍者》设计报告.doc
- the Art & Science of C电子版PDF+DOC 带目录
- c语言 linux 贪吃蛇.doc
评论
共有 条评论