 fs = require 'fs'
 Data = require '../data'
+Directory = require './directory'
+NameTable = require './tables/name'
 
 class DFont
     @open: (filename) ->

            pos = data.pos
            data.pos = typeListOffset + refListOffset
            
            for i in[0..maxTypeIndex]
                id = data.readShort()
                nameOfs = data.readShort()
                attr = data.readByte()

        throw new Error "Font #{name} not found in DFont file." unless entry
        
        data.pos = entry.offset
        
        length = data.readUInt32()
        ret = data.slice(data.pos, data.pos + length)
        
