Skip to content

Consider better-supported html entity for icon to remove stop #25

Description

@abbottc

Grapick uses the HTML entity ⨯ as the icon for removing a stop. This entity maps to U+2A2F which was introduced somewhat later to Unicode in v3.2.0 and therefore has lower inclusion among fonts than those which have been present from early on. For example, this is the supported font list from fileformat.info for U+2A2F, which is an incomplete list but provides a point of comparison (see below).

A specific example of the issue is that Firefox and Chrome installed on some Linux versions use the FreeSerif font by default which does not include U+2A2F.

Therefore, in order to use Grapick in a compliant manner requires either using custom code to replace that HTML entity with a more supported one, or adding a webfont to the site which supports the entity, neither of which is a very ideal scenario.

I'd like to suggest a couple options to help this issue:

The first and simplest is simply switching to a similar HTML entity with broader support. A likely candidate is ×, which for comparison was introduced in Unicode 1.1.0 and has broad font support. The number of supported fonts given by fileformat.info is about 10 times larger.

Another option would be to provide an initialization option for Grapick to override the symbol used, something like

new Grapick({el: '#gp', removeStopSymbol: '×'})

However, this option may be somewhat cumbersome even though it's more adaptive, since it's likely that any such override would also necessitate overriding some Grapick CSS to accommodate inevitable slight size differences in whatever symbol is used. So, the first option may be better, but either would be a sufficient resolution. I can provide a PR if you'd prefer, if either option is agreeable.

Thanks for providing Grapick as an open source project!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions