generated from bing/readnotes
26 lines
668 B
C++
26 lines
668 B
C++
#include "head.h"
|
||
#include <iostream>
|
||
void fontHead::read(reader* rd){
|
||
//先读4字节,看是ttf还是ttc
|
||
auto ft = rd->readString(4);
|
||
if(ft == "ttcf"){
|
||
throw "not support ttc";
|
||
}
|
||
rd->seek(0);
|
||
verMain = rd->readUint16();
|
||
verSub = rd->readUint16();
|
||
tableCount = rd->readUint16();
|
||
auto arg1 = rd->readUint16();
|
||
args.push_back(arg1);
|
||
auto arg2 = rd->readUint16();
|
||
args.push_back(arg2);
|
||
auto arg3 = rd->readUint16();
|
||
args.push_back(arg3);
|
||
}
|
||
|
||
void fontHead::display(){
|
||
std::cout<<"this is header"<<std::endl;
|
||
std::cout<<"version: "<<verMain<<"."<<verSub<<"\ttableCount: "<<tableCount<<std::endl;
|
||
}
|
||
|