generated from bing/readnotes
70 lines
1004 B
C++
70 lines
1004 B
C++
|
#include "cmap.h"
|
||
|
|
||
|
void cmap::read(reader *rd)
|
||
|
{
|
||
|
_header = CmapHeader(rd);
|
||
|
auto curr = rd->curr();
|
||
|
_tableFormat = rd->readUint16();
|
||
|
rd->seek(curr);
|
||
|
switch (_tableFormat)
|
||
|
{
|
||
|
case 0:
|
||
|
{
|
||
|
CmapTable0 t(rd);
|
||
|
_table = &t;
|
||
|
}
|
||
|
break;
|
||
|
case 2:
|
||
|
{
|
||
|
CmapTable2 t(rd);
|
||
|
_table = &t;
|
||
|
}
|
||
|
break;
|
||
|
|
||
|
case 4:
|
||
|
{
|
||
|
CmapTable4 t(rd);
|
||
|
_table = &t;
|
||
|
}
|
||
|
break;
|
||
|
case 6:
|
||
|
{
|
||
|
CmapTable6 t(rd);
|
||
|
_table = &t;
|
||
|
}
|
||
|
break;
|
||
|
case 8:
|
||
|
{
|
||
|
CmapTable8 t(rd);
|
||
|
_table = &t;
|
||
|
}
|
||
|
break;
|
||
|
case 10:
|
||
|
{
|
||
|
CmapTable10 t(rd);
|
||
|
_table = &t;
|
||
|
}
|
||
|
break;
|
||
|
case 12:
|
||
|
{
|
||
|
CmapTable12 t(rd);
|
||
|
_table = &t;
|
||
|
}
|
||
|
break;
|
||
|
case 13:
|
||
|
{
|
||
|
CmapTable13 t(rd);
|
||
|
_table = &t;
|
||
|
}
|
||
|
break;
|
||
|
case 14:
|
||
|
{
|
||
|
CmapTable14 t(rd);
|
||
|
_table = &t;
|
||
|
}
|
||
|
break;
|
||
|
default:
|
||
|
_table = nullptr;
|
||
|
break;
|
||
|
}
|
||
|
}
|