generated from bing/readnotes
24 lines
493 B
C++
24 lines
493 B
C++
#include "font.h"
|
|
#include "tables/table_name.h"
|
|
#include "reader/buffer.h"
|
|
#include <iostream>
|
|
#include "../reader/file.h"
|
|
font::font(const char* fontFile){
|
|
file rd(fontFile);
|
|
path = rd.getPath();
|
|
read(&rd);
|
|
}
|
|
|
|
void font::read(reader* rd){
|
|
//读取字体头
|
|
head.read(rd);
|
|
//读取表信息
|
|
table.read(rd, head.getTableCount());
|
|
|
|
}
|
|
|
|
void font::display(){
|
|
std::cout<<"font file"<<path<<" readed."<<std::endl;
|
|
head.display();
|
|
table.display();
|
|
} |