Skip to content

Commit

Permalink
Remove glyf table from CBDT font to make it work
Browse files Browse the repository at this point in the history
  • Loading branch information
RoelN committed Aug 16, 2016
1 parent b54d0ac commit c6889d6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 33 deletions.
4 changes: 2 additions & 2 deletions chromacheck-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions chromacheck.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* ChromaCheck 1.11
* ChromaCheck 1.12
* @author Roel Nieskens, https://pixelambacht.nl
* MIT license
*/
Expand Down Expand Up @@ -49,7 +49,7 @@
context = canvas.getContext('2d'),
img = new Image(),
fontSBIX = 'd09GRgABAAAAAALoAAsAAAAAA2gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABbAAAADoAAABgF/InTmNtYXAAAAGwAAAALgAAADTpGek7Z2x5ZgAAAegAAAAUAAAAFAgBOQJoZWFkAAABCAAAADAAAAA2CSi71WhoZWEAAAE4AAAAFQAAACQIAQQCaG10eAAAAagAAAAIAAAACAQAAABsb2NhAAAB4AAAAAgAAAAIAAAACm1heHAAAAFQAAAAHAAAACACDwAbbmFtZQAAAfwAAABDAAAATgSgDQdwb3N0AAACQAAAAAwAAAAgAAMAAHNiaXgAAAJMAAAAnAAAAQglRrHNeAFjYGRgAOG5V+edjee3+cogzcIAApcWMAmA6MtRJSdANAsDWJyDgQlEAQAjygideAFjYGRgYGEAAjgJFEEFjAABkQAQAAAAeAFjYGRgYGBmYALTDFCSiwEowCABYgIAAeAALXgBY2BhYWCcwMDKwMA0k+kMAwNDP4RmfM1gzMjJgAoYBZA4CkDAcOAl40ugCSAAJNGBAgMDAABtCHkAAAQAAAAAAAAAeAElxTkBgEAMALDc007MYAH/riqCnyxBMzQsph1panq1mtfF/2Y9NeAGqNkJIQAAAAAAAAAAAAoAAQAAAAAEAAQAAAEAADEBBAAEAHgBLcZVAYQAAECxd4aEQCIQASlABNzd26P3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ADYJKbfRaGhlYQAAATgAAAAVAAAAJAgBBAJobXR4AAABrAAAAAgAAAAIBAAAAGxvY2EAAAHkAAAACAAAAAgAAAAPbWF4cAAAAVAAAAAdAAAAIAIPAB5uYW1lAAACCAAAADcAAAA8ApwLJXBvc3QAAAJAAAAADAAAACAAAwAAeAFjYGRgAGHGI+m98fw2XxmkWRhA4NICJgEQfTm64AiIZmEAi3MwMIEoAO/7B3IAeAFjYGRgYGEAAjgJFEEFjAABkQAQAAAAeAFjYGRgYGBmYAXTDFCSi4GBiYFBAsQEAAIrADAAAAB4AWNgYWFgnMDAysDANJPpDAMDQz+EZnzNYMzIyYAKGAWQOApAwHDgJdNLoAkgACTRgQIDAwAAjAh6AAAEAAAAAAAAAHgBJcU5AYBADACw3NeJuRrw76oi+MkSNEPDZtoRpqZXr3ld/OeVpwbcs+wKIQAAAAAAAAAAAAAPeAFjYGQAAhYgBCFBRSBkYfjDAMEMABXBAocAAHgBY2BgYGKQY2BmYGThZGAEshigbCYw25khg6GIIZ8hlyERzE5lSGbIZlBgCGYIY3AHAGnZBcoAeAFjYGbACwAAfQAEeAFtD4VOQzEQ4ug3XA7XXnHrFiU2YjixeV9D7c3391RwOHeZiTCf5GzEoJeDSVfVidEw6vT6ylmBfJ8QOrbl2spKgfd313tnWK3MQ4Kr/khCqLd9gcVg4C8YG4/H++PDfdeT7ICIWKjAXHIx0cq+/lfIz8/PWcri980cQbUFSj31Bce0M2+VMOg1bL/rekZgv9XQnU2+u8e3vtWEKt8YFNBVWgtcOTygAAhh3A0Bp4MjqCX5zSSoURbJ/dAvCOzbbiY/n4+/Vd4AJ3hQnQAAAA==',
svg = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="100" style="background:#fff;color:blue">'+
Expand Down
3 changes: 2 additions & 1 deletion demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ <h1>ChromaCheck by PixelAmbacht</h1>
<div class="svg">SVG-in-OpenType is <strong>not</strong> supported</div>
<div class="cbdt">CBDT/CBLC is <strong>not</strong> supported</div>

<p>ChromaCheck checks which OpenType color formats are supported in this browser.
<p>ChromaCheck checks which <a href="https://pixelambacht.nl/2014/multicolor-fonts/">OpenType
color formats</a> are supported in this browser.
<a href="https://github.com/RoelN/ChromaCheck">Get the code on Github!</a></p>

<script src="chromacheck-min.js"></script>
Expand Down
29 changes: 1 addition & 28 deletions src/chromacheck-cbdt.ttx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<!-- The 'id' attribute is only for humans; it is ignored when parsed. -->
<GlyphID id="0" name=".notdef"/>
<GlyphID id="1" name="uniE903"/>
<GlyphID id="2" name="uniE904"/>
</GlyphOrder>

<head>
Expand Down Expand Up @@ -124,41 +123,15 @@
<hmtx>
<mtx name=".notdef" width="1024" lsb="0"/>
<mtx name="uniE903" width="1024" lsb="0"/>
<mtx name="uniE904" width="1024" lsb="0"/>
</hmtx>

<cmap>
<tableVersion version="0"/>
<cmap_format_4 platformID="3" platEncID="1" language="0">
<map code="0xe903" name="uniE903"/><!-- ???? -->
<map code="0xe904" name="uniE904"/><!-- ???? -->
</cmap_format_4>
</cmap>

<loca>
<!-- The 'loca' table will be calculated by the compiler -->
</loca>

<glyf>

<!-- The xMin, yMin, xMax and yMax values
will be recalculated by the compiler. -->

<TTGlyph name=".notdef"/><!-- contains no outline data -->

<TTGlyph name="uniE903"/><!-- contains no outline data -->

<TTGlyph name="uniE904" xMin="0" yMin="0" xMax="1024" yMax="1024">
<contour>
<pt x="0" y="0" on="1"/>
<pt x="1024" y="1024" on="1"/>
</contour>
<instructions><assembly>
</assembly></instructions>
</TTGlyph>

</glyf>

<name>
<namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
ChromaCheck CBDT
Expand Down Expand Up @@ -197,7 +170,7 @@
ee000000 03504c54 45640000 e8a45e26
00000010 49444154 780163a0 1b1805a3
60140000 03700001 dc91ef93 00000000
49454e44 ae426082
49454e44 ae426082
</rawimagedata>
</cbdt_bitmap_format_17>
</strikedata>
Expand Down

0 comments on commit c6889d6

Please sign in to comment.