2018-03-22 14:03:47 +00:00
|
|
|
/*
|
|
|
|
* This file is subject to the terms and conditions defined in
|
|
|
|
* file 'LICENSE.md', which is part of this source code package.
|
|
|
|
*/
|
|
|
|
|
2018-03-22 13:01:04 +00:00
|
|
|
package cmap
|
|
|
|
|
|
|
|
type cmapObject interface {
|
|
|
|
}
|
|
|
|
|
|
|
|
type cmapName struct {
|
|
|
|
Name string
|
|
|
|
}
|
|
|
|
|
|
|
|
type cmapOperand struct {
|
|
|
|
Operand string
|
|
|
|
}
|
|
|
|
|
2018-06-27 12:25:59 +10:00
|
|
|
// cmapHexString represents a PostScript hex string such as <FFFF>
|
2018-03-22 13:01:04 +00:00
|
|
|
type cmapHexString struct {
|
2018-06-03 01:05:46 +00:00
|
|
|
numBytes int // original number of bytes in the raw representation
|
|
|
|
b []byte
|
2018-03-22 13:01:04 +00:00
|
|
|
}
|
|
|
|
|
2018-06-27 12:25:59 +10:00
|
|
|
type cmapFloat struct {
|
|
|
|
val float64
|
|
|
|
}
|
|
|
|
|
|
|
|
type cmapInt struct {
|
|
|
|
val int64
|
|
|
|
}
|
|
|
|
|
2018-03-22 13:01:04 +00:00
|
|
|
type cmapString struct {
|
|
|
|
String string
|
|
|
|
}
|
|
|
|
|
|
|
|
type cmapArray struct {
|
|
|
|
Array []cmapObject
|
|
|
|
}
|
|
|
|
|
|
|
|
type cmapDict struct {
|
|
|
|
Dict map[string]cmapObject
|
|
|
|
}
|
|
|
|
|
|
|
|
func makeDict() cmapDict {
|
2018-06-27 12:25:59 +10:00
|
|
|
return cmapDict{Dict: map[string]cmapObject{}}
|
2018-03-22 13:01:04 +00:00
|
|
|
}
|