Giter Site home page Giter Site logo

unicode support about decker HOT 6 CLOSED

farvardin avatar farvardin commented on June 8, 2024
unicode support

from decker.

Comments (6)

JohnEarnest avatar JohnEarnest commented on June 8, 2024 1

This is an intentional limitation.

Unicode, in its entirety, is staggering in scope. While supporting some subset of Unicode, someday, is not impossible, it would introduce a daunting amount of complexity. For pixel-perfect cross-platform results, Decker uses custom text layout routines and its own collection of bitmapped fonts, which would both need to be extended to include new glyphs for most non-English languages, and I'd also need to adapt the touch keyboard to permit entering those new glyphs.

Supporting UTF-8 in Lil itself isn't as bad, but it would introduce impedance mismatches between Lil and Decker. For example, it would no longer necessarily be the case that a Lil string or a Lil identifier is displayable in Decker. Lil can presently manipulate UTF-8 data as raw bytes using the "array" interface, but in many ways this is less convenient than working with ordinary strings.

For displaying text in Decker, some workarounds are possible; Decks can include custom fonts, and "rich text" fields can include inline bitmaps and reference different fonts for a given span, but copying and pasting "blended" text would reveal the underlying ASCII. There is some precedent for "normalizing" Unicode characters to ASCII equivalents on input (presently Decker "straightens" curly-quote characters, for example), but I doubt that applying this approach to letters would make users of languages with diacritics very happy.

from decker.

farvardin avatar farvardin commented on June 8, 2024 1

What we don't want is Decker would become bloated, so I'm fine with this limitation!

from decker.

JohnEarnest avatar JohnEarnest commented on June 8, 2024 1

No. Including UniFont would increase the baseline size of web-decker by multiple megabytes for a single font, and as previously stated I do not wish to drag in all the text layout and string manipulation complications of Unicode.

If future versions of Decker support non US-ASCII characters, I'm much more inclined to pursue an equivalent of MacRoman's extended code page and convert to and from UTF-8 at the periphery of the system; it would be possible to support French, German, Spanish, Portuguese, and a handful of other major western languages with relatively sparing changes to text layout and string representations.

from decker.

farvardin avatar farvardin commented on June 8, 2024

sure, I understand, it quite beyond the scope of Decker. We'll deal with it :)

from decker.

JohnEarnest avatar JohnEarnest commented on June 8, 2024

Thanks for your understanding. I do apologize for the accessibility limitations of this constraint.

from decker.

easrng avatar easrng commented on June 8, 2024

@JohnEarnest would you accept a PR for this? I think UniFont might be a good fit for decker.

from decker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.