glyf | Chrome new tab extension | Browser Plugin library

 by   davidpaulsson TypeScript Version: Current License: MIT

kandi X-RAY | glyf Summary

kandi X-RAY | glyf Summary

glyf is a TypeScript library typically used in Plugin, Browser Plugin applications. glyf has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Chrome new tab extension
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              glyf has a low active ecosystem.
              It has 12 star(s) with 3 fork(s). There are 2 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 0 open issues and 7 have been closed. On average issues are closed in 99 days. There are 22 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of glyf is current.

            kandi-Quality Quality

              glyf has no bugs reported.

            kandi-Security Security

              glyf has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              glyf is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              glyf releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of glyf
            Get all kandi verified functions for this library.

            glyf Key Features

            No Key Features are available at this moment for glyf.

            glyf Examples and Code Snippets

            No Code Snippets are available at this moment for glyf.

            Community Discussions

            QUESTION

            Number of font tables in TrueType Font files?
            Asked 2019-Aug-02 at 15:30

            According to Apple's Reference manual for TrueType font files, there are 45 different types of font tables. Checking those ttf I have installed on my system, I have acertained that the number of tables actually present in those files ranges from 12 to maximum 22 font tables per file.

            Looking further at the structure of a true type font file, it start with this information:

            uint32 scaler type A tag to indicate the OFA scaler to be used to rasterize this font; see the note on the scaler type below for more information.
            uint16 numTables number of tables
            uint16 searchRange (maximum power of 2 <= numTables)*16
            uint16 entrySelector log2(maximum power of 2 <= numTables)
            uint16 rangeShift numTables*16-searchRange

            which gives reason to believe there would be a common need for the precalculated, but yet totally imho redudant fields rangeShift, entrySelector, searchRange. It even states them to be employed for binary searching of the list of font tables:

            The entries for searchRange, entrySelector and rangeShift are used to facilitate quick binary searches of the table directory that follows (source https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html)

            A valid reason to even consider adding those fields, which could anyway be calculated on the fly from numTables would be indeed that there is a large number of font tables.

            My question is therefore, if despite my testing there exist indeed occasions in which true type fonts are reasonably to be expected to have a larger (e.g. >1000) number of tables, which would imply the question if it is at all possible that any of the 45 different type of font tables can occure multiple times?

            The tables it listed are the following.

            1. The 'acnt' (accent attachment) table
            2. The 'ankr' (anchor point) table
            3. The 'avar' (axis variation) table
            4. The 'bdat' (bitmap data) table
            5. The 'bhed' (bitmap font header) table
            6. The 'bloc' (bitmap location) table
            7. The 'bsln' (baseline) table
            8. The 'cmap' (character code mapping) table
            9. The 'cvar' (CVT variation) table
            10. The 'cvt ' (control value) table
            11. The 'EBSC' (embedded bitmap scaling control) table
            12. The 'fdsc' (font descriptor) table
            13. The 'feat' (layout feature) table
            14. The 'fmtx' (font metrics) table
            15. The 'fond' (font family compatibility) table
            16. The 'fpgm' (font program) table
            17. The 'fvar' (font variation) table
            18. The 'gasp' (grid-fitting and scan-conversion procedure) table
            19. The 'glyf' (glyph outline) table
            20. The 'gvar' (glyph variation) table
            21. The 'hdmx' (horizontal device metrics) table
            22. The 'head' (font header) table
            23. The 'hhea' (horizontal header) table
            24. The 'hmtx' (horizontal metrics) table
            25. The 'just' (justification) table
            26. The 'kern' (kerning) table
            27. The 'kerx' (extended kerning) table
            28. The 'lcar' (ligature caret) table
            29. The 'loca' (glyph location) table
            30. The 'ltag' (language tag) table
            31. The 'maxp' (maximum profile) table
            32. The 'meta' (metadata) table
            33. The 'morx' (extended metamorphosis) table
            34. The 'name' (name) table
            35. The 'opbd' (optical bounds) table
            36. The 'OS/2' (compatibility) table
            37. The 'post' (glyph name and PostScript compatibility) table
            38. The 'prep' (control value program) table
            39. The 'prop' (properties) table
            40. The 'sbix' (extended bitmaps) table
            41. The 'trak' (tracking) table
            42. The 'vhea' (vertical header) table
            43. The 'vmtx' (vertical metrics) table
            44. The 'xref' (cross-reference) table
            45. The 'Zapf' (glyph reference) table

            It seems that the "font tables" allow any random "extension" among them, as for instance there is a font table labeled FFTM, which

            "[...] is unique to FontForge. It contains three timestamps: First FontForge's version date, then when the font was generated, and when the font was created. I describe its format here."

            https://fontforge.github.io/TrueOpenTables.html

            Still even those occasional added tables like FFTM would not seem to merit the fields searchRange etc.

            ...

            ANSWER

            Answered 2019-Aug-02 at 15:30

            When TrueType was invented in the late 1980s/early 1990s, the developers were not certain how things would evolve as the format was adopted. Also remember that processor speeds were considerably slower then.

            As it turns out, indeed, few fonts have more than about 25 tables, and probably none that approach the number where a binary search and the use of the pre-calculated fields would make much difference in locating a table (versus just iterating through the sorted list).

            Nevertheless, the fields are part of the specification and can’t be “omitted”. Many implementations ignore the fields, and they are frequently filled with wrong values, but be aware that many font checkers/validators/sanitizers DO check them and might flag wrong values as an invalid font. So if you’re asking this question as regards creating a font, I would advise filling in the fields with correct data.

            Source https://stackoverflow.com/questions/57324782

            QUESTION

            TrueType Font cmap table Format 0 not serializing
            Asked 2019-Jan-22 at 16:16

            Here is the data I am using to construct the table:

            ...

            ANSWER

            Answered 2019-Jan-22 at 16:16

            It looks like Chrome, which uses OTS, doesn't support format 0.

            Source https://stackoverflow.com/questions/54311078

            QUESTION

            Missing pieces for TTF font building from Spec
            Asked 2019-Jan-13 at 21:58

            I am having issue with solving these problems with regard to TTF spec.

            1. "Computing the checksum" in "head".
            2. "xMin", "yMin", etc. in "head"
            3. maxPoints, maxContours, maxComponentPoints, maxComponentContours, maxTwilightPoints in "maxp"
            4. uint8 flags[variable] Array of flags in "glyf"

            I would like to know if someone could clarify these pieces.

            1

            For (1) it says this:

            checkSumAdjustment To compute: set it to 0, calculate the checksum for the 'head' table and put it in the table directory, sum the entire font as a uint32_t, then store 0xB1B0AFBA - sum. (The checksum for the 'head' table will be wrong as a result. That is OK; do not reset it.),

            I found two checksum implementations they referenced:

            ...

            ANSWER

            Answered 2019-Jan-13 at 21:58

            In general, you might find the current OpenType specification helpful as it contains a number of updates, clarifications, and corrections that don't appear in the Apple version.

            As to your specific questions:

            1 head.checksumAdj calculation

            The instructions are reasonably clear, though there is an implied "step zero" of assemble all font data (tables, directory, etc.) into final form and order. Once you have that:

            1. set the value of checkSumAdj in the head table to zero

            2. calculate the checksum of just the head table and store it in the corresponding field in the font's table directory (where tag/checksum/offset/length are stored for all tables included in the font)

            3. calculate the sum of the entire font (sum of all uint32s, just like table checksums), including the modifications in steps 1 and 2.

            4. store 0xB1B0AFBA minus the value from step 3 in head.checkSumAdj. That's all! The wording about the head checksum appearing incorrect means that if you were to run the checksum calculation on the head table after storing the final value, it would appear wrong. But that is okay, because that's how it was defined: essentially for the checksum of the head table, you must ignore (set to 0) the checkSumAdj value first.

            2 head xMin, xMax, yMin, yMax

            This is simply the xMin, xMax, yMin, and yMax of all glyphs. Each glyph xMin, xMax, etc. is quite simply "the minimum (maximum) X (Y) coordinate" of all points (for compound glyphs, you would take that result after composing the glyph, i.e. after applying any shift, scale, or other transformations in the composite glyph definition). In both the head table and glyph data, the bounding box is an array of 16-bit signed integers. So generally the procedure would be to loop over every glyph, get the calculated bounding box, and as you are doing this, keep track of the X/Y min/max (independently). When you are done with the loop, you'll have the values for the head table which is essentially a rectangle that includes every coordinate of every glyph in the font.

            3 maxp values

            These are reasonably well-defined in the maxp table definition:

            • maxPoints is the maximum number of points of any single non-composite ("simple") glyph

            • maxContours is similarly the maximum number of contours of any single non-composite glyph

            • maxComponentPoints is the maximum number of points in a composite glyph (i.e. the sum of points of all component glyphs)

            • maxComponentContours is similarly the maximum number of contours in a composite glyph

            • maxTwilightPoints refers to the maximum number of "twilight" points used in Zone 0 of TrueType instructions. If your font does not make use of TrueType instructions, this (and other instruction-related fields) can be set to zero. You might want to review the "Instructing TrueType Glyphs" and "TrueType Instruction Set" sections of the OpenType specification if you are not familiar with TrueType instructions (often referred to as "hints") and how they are stored in the glyph data.

            4 glyf table simple glyph flags

            uint8 flags[variable] indicates that the length of the flags array is variable. The reason for that is discussed in the specification ("Simple Glyph Flags"):

            In logical terms, there is one flag byte element, one x-coordinate, and one y-coordinate for each point. Note, however, that the flag byte elements and coordinate arrays used packed representations. In particular if a logical sequence of flag elements or sequence of x- or y- coordinates is repeated, then the actual flag byte element or coordinate value can be given in a single entry, with special flags used to indicate that this value is repeated for subsequent logical entries.

            In other words, the elements of the flags array, when expanded are per-coordinate, but the actual storage as an array of uint8 is not necessarily (as with the storage of the coordinate data itself). It largely depends on the arrangement of coordinates in each glyph.

            Source https://stackoverflow.com/questions/54151857

            QUESTION

            Components of Compund Glyphs in OpenType/TrueType
            Asked 2018-Oct-05 at 15:39

            I cannot find any information in the specification for the OpenType/TrueType glyf table that clarifies if the components of a compound glyph are always simple glyphs, or if they can be compound glyphs themselves (i.e. recursive compound glyphs).

            Since the specification does not explicitly prohibit compound glyphs as components, I would assume that it is possible in theory. But my question is: Are there any fonts that actually contain recursive compound glyphs? And do any of the major font tools support this?

            The background is that I am writing a simple font parser and I want to know if I need to be aware of recursive compound glyphs, because this would make the algorithms a bit more complicated.

            Update: I found some information in the spec for the maxp table. This defines maxComponentDepth, which is the maximum level of recursions for compound glyphs. This shows me that recursive compound glyphs are possible. But are they actually being used?

            ...

            ANSWER

            Answered 2017-Mar-11 at 21:58

            I found that in the standard Arial font there are four compound glyphs that have another compound glyph as a component. One example is the glyph at index 471, which is used for unicode U+01FB (latin small letter a with ring above and acute). It consists of the Acute glyph, which is a simple glyph, and the small latin a with ring above, which is a compound glyph.

            Composition of glyph 471 in TrueType font Arial:

            So the conclusions from this are:

            1. Recursivly compound glyphs are possible in TrueType/OpenType fonts.
            2. These glyphs exist in common fonts.

            Source https://stackoverflow.com/questions/42728813

            QUESTION

            truetype font ARGS_ARE_XY_VALUES meaning?
            Asked 2018-Aug-28 at 23:38

            In the glyf table, if a glyph is a composite glyph, I don't understand what it means if the flag ARGS_ARE_XY_VALUES is not set. The msdn docs say

            the first point number indicates the point that is to be matched to the new glyph. The second number indicates the new glyph’s “matched” point. Once a glyph is added, its point numbers begin directly after the last glyphs (endpoint of first glyph + 1).

            But I have NO idea what it means:

            • What is a "point number"? Is it an index into the glyph's points?
            • What does "matched to the new glyph" mean?
            ...

            ANSWER

            Answered 2018-Aug-28 at 23:38

            What is a "point number"? Is it an index into the glyph's points?

            Yes. It’s an index into the array of pairs of coordinates that make up the glyph’s outline (as defined in the glyph’s contour data).

            What does "matched to the new glyph" mean?

            It means that the new component glyph of that composite/compound glyph is to be positioned so that the coordinates of its ‘match point’ are equal to those of the ‘match point’ of the base component glyph. In other words: so that the indicated points for the two components match. This is repeated for each new component glyph, with the point numbers/indices of the already matched components being treated as if it were a single, base component glyph.

            Source https://stackoverflow.com/questions/52031846

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install glyf

            You can download it from GitHub.

            Support

            In general, we follow the "fork-and-pull" Git workflow.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/davidpaulsson/glyf.git

          • CLI

            gh repo clone davidpaulsson/glyf

          • sshUrl

            git@github.com:davidpaulsson/glyf.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link