tehreer / sheenfigure Goto Github PK
View Code? Open in Web Editor NEWAn implementation of advanced typographic tables of OpenType specification.
License: Apache License 2.0
An implementation of advanced typographic tables of OpenType specification.
License: Apache License 2.0
A wrapper should be written for SheenFigure to support Text Rendering Tests. It would be very useful to check where the implementation stands from the Unicode community's perspective.
To prevent attacks, impose an upper limit on buffer size and execution time when shaping text. For example, increment a counter on the number of executed OpenType lookups and give up when it gets excessive, and make sure that the rendering buffer does not get excessively large; check out how HarfBuzz does this. See test case GSUB-3.
Support for reverse chaining contextual substitution needs to be added.
Some fonts dependent on this table:
Urdu Typesetting - http://www.cufonfonts.com/en/font/13510/urdu-typesetting
Pak Nastaleeq - http://www.urdujahan.com/font.html
There should be a way to turn on / off existing features. The possibility of applying custom features should also be included.
With the introduction of OpenType Font Variations, device tables are intended to be replaced with their variation counterparts, such as the Variation Index Table. The support of variable positioning is a must to target modern OpenType fonts.
The current implementation only selects the provided script tag, but the OpenType specification defines a fallback mechanism. The relevant paragraph from Common Table Formats is following.
An application should use a DFLT script table if there is not a script table associated with the specific script of the text being formatted, or if the text does not have a specific script (for example, it contains only symbols or punctuation).
Since travis ci does not support windows for c/cpp projects, appveyor should be integrated for that purpose.
Hi,
I'm curious. What's the motivation for writing this library? Why couldn't you use HarfBuzz?
The device table allows improved positioning for specific font sizes. It complements all positioning tables via value records and anchors.
Documentation: https://docs.microsoft.com/en-us/typography/opentype/spec/chapter2#device-and-variationindex-tables
In order to support variable fonts, some adjustments are required in the font class. As variable fonts can substitute the features, it is not possible to select a variable instance in the artist. There should perhaps be a function to create a variable instance of the font from the default one.
Even though SFAlbum provides mapping from code unit to glyph index, caret positions need to be calculated manually. The process is very complex as the caret should not stop at some code units such as surrogates, or the caret adjustments should be identified in cases of character/glyph clusters. There can be ligatures whose effective caret positions should be obtained from Ligature Caret List Table.
Since caret handling is very fundamental need of text editing, having it implemented in SFAlbum would be very helpful. The logic can be borrowed from loadCharExtents method in Tehreer-Android project.
The code unit to glyph map is correctly produced for forward text mode. In case of backward text mode, it remains correct for 1-1 mapping. But if there are ligatures or multiple substitutions, it becomes invalid.
The support for getting the general category of a code point has been added in SheenBidi
. It would be a good idea to use that method instead of duplicating the lookup feature here in SheenFigure
as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.