Skip to content

Conversation

@adrg
Copy link
Collaborator

@adrg adrg commented Feb 17, 2020

Related to unidoc/unipdf-examples#75


This change is Reviewable

}

// Nbits returns 8 bits for simple font CMaps and 16 bits for CID font CMaps.
func (cmap *CMap) NBits() int {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically one cmap could have a combination of both? i.e. single, and multi byte?

Copy link
Collaborator Author

@adrg adrg Feb 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CMap can contain multiple codespaces, which can cover single or multi-byte ranges. So technically, yes. nbits seems to represent the byte size of the largest codespace.

@adrg adrg changed the base branch from master to development February 17, 2020 22:02
Copy link
Contributor

@gunnsth gunnsth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gunnsth gunnsth merged commit 9de5fe6 into unidoc:development Feb 17, 2020
@adrg adrg deleted the improve-text-encoding branch February 18, 2020 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants