Skip to content

Refactor fontnik font registering? #77

@lbud

Description

@lbud

@springmeyer would love to get your feedback on this —

node-fontnik will be used in the font uploading API, but @mikemorris and I talked about how we could totally refactor this to no longer use the Mapnik font registry concept and have little name2face maps floating around, but rather pull the streaming logic out so that we could do something like

fontnik.load(fontfile, function(faces) {
  // faces returns an array per face from the file of objects that look like
  // {  face_name: "",
  //    family_name: "",
  //    style_name: "",
  //    codepoints: [],
  //    range: function
  // }
})

(where the FT library/stream is scoped to the callback so that the range function can be repeatedly called inside the callback). And eliminate much of the node-fontnik API.

But, given that the registry actually seems (if I understand correctly) mostly harmless — just a name-to-face map — is it worth doing this? (Or is it harmless?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions