Commit Graph

665 Commits

Author SHA1 Message Date
Patrick Walton 731360bc9d Try to fix RGBA atlas generation in OpenGL 2017-02-13 12:32:15 -08:00
Patrick Walton b000f6d882 Fix the case where the first and last points are both off-curve 2017-02-13 11:56:10 -08:00
Patrick Walton cd11deab46 Support RGBA atlases, needed for WebRender 2017-02-10 19:07:23 -08:00
Patrick Walton 959293839f Read shaders from disk instead of compiling them into the binary 2017-02-10 17:44:22 -08:00
Patrick Walton c4c19076c7 Allow the same glyph at different sizes to be rendered into the same atlas. 2017-02-10 17:20:05 -08:00
Patrick Walton d306ef01d1 Complete the documentation 2017-02-10 16:04:13 -08:00
Patrick Walton 6261c87b89 Read the OS/2 metrics to determine the right line spacing 2017-02-09 20:02:32 -08:00
Patrick Walton 55e1502eb2 Add build instructions 2017-02-09 17:40:37 -08:00
Patrick Walton 96daa32b90 Move direction calculation from the TCS to the TES to properly handle cusps 2017-02-09 17:09:19 -08:00
Patrick Walton 1e50bf78ba Implement basic kerning via the 'kern' table 2017-02-08 17:10:49 -08:00
Patrick Walton 5ecfadc3be Update for unorm change in `compute-shader` 2017-02-08 16:29:23 -08:00
Patrick Walton a0b23592b5 Allow specific fonts in collections to be selected 2017-02-08 15:34:16 -08:00
Patrick Walton ed4bc9b5b6 Add a README and a license 2017-02-08 14:10:42 -08:00
Patrick Walton 428a91aefa Get things working on Windows 2017-02-08 13:55:36 -08:00
Patrick Walton 851b40ea6c Document the crate 2017-02-07 20:20:14 -08:00
Patrick Walton ccf17493e0 Rename `GlyphRanges` to `GlyphMapping` and document it 2017-02-07 20:02:10 -08:00
Patrick Walton dcd3eefa33 Refactor the API to consume builders 2017-02-07 19:32:32 -08:00
Patrick Walton 9b6e8d1f41 Add some documentation 2017-02-07 17:19:36 -08:00
Patrick Walton 0e3aeb782d Fix a couple of integer overflows 2017-02-07 16:53:37 -08:00
Patrick Walton a6711af84f Add support for Format 12 cmaps 2017-02-07 16:04:15 -08:00
Patrick Walton 66d239cf2f Break at word boundaries 2017-02-07 14:40:03 -08:00
Patrick Walton e9fd5d6b1b Work around driver bugs on Apple Radeon GPUs 2017-02-07 14:39:36 -08:00
Patrick Walton 4be3938ab7 Reformat the lorem ipsum text 2017-02-06 18:13:58 -08:00
Patrick Walton 65153b65ee Fix subpixel positioning 2017-02-06 18:02:16 -08:00
Patrick Walton 7cd7210304 Fix winding rule to paint negative winding numbers 2017-02-06 15:28:23 -08:00
Patrick Walton bc6efc9b62 Compute shelf height properly 2017-02-06 14:45:06 -08:00
Patrick Walton 8033149e8b Fix calculation of glyph offset in indirect-mapped tables 2017-02-06 12:54:32 -08:00
Patrick Walton 23f7f88f43 Add support for composite glyphs 2017-02-06 11:44:26 -08:00
Patrick Walton 5453afa7a1 Add errors throughout 2017-02-03 18:25:56 -08:00
Patrick Walton 78c03a9594 Fix TTC handling 2017-02-03 18:03:51 -08:00
Patrick Walton 316123123a Add error handling to the OTF format 2017-02-03 17:52:33 -08:00
Patrick Walton 23fa035178 Rename "glyph buffer" to "outline", since "glyph" is ambiguous 2017-02-03 17:18:05 -08:00
Patrick Walton d5be9e1f16 Rename "batch" to "atlas" and "atlas" to "rect packer" 2017-02-03 17:04:57 -08:00
Patrick Walton 86fec9ff54 Fix local path in Cargo.toml 2017-02-03 15:18:48 -08:00
Patrick Walton da7c70f035 Handle glyph outlines in which the first point is off-curve correctly.
These show up in Helvetica.dfont and Times.dfont.
2017-02-03 15:18:07 -08:00
Patrick Walton ce383385df Add partial support for Mac `.dfont` suitcases 2017-02-03 13:13:54 -08:00
Patrick Walton 4418f5b07c Audit public members some 2017-02-02 17:00:37 -08:00
Patrick Walton 3fb592e05a Fix up examples and tests 2017-02-02 16:40:46 -08:00
Patrick Walton c41cd1f150 Remove local path mistakenly added to Cargo.toml 2017-02-02 16:07:07 -08:00
Patrick Walton b7e9763e5a Update the benchmark 2017-02-02 16:06:36 -08:00
Patrick Walton 94406a1d62 Add a simple benchmarking tool. Only benchmarks GPU time, not CPU for
now.
2017-01-31 18:33:24 -08:00
Patrick Walton 6ae7601283 Add borders between glyphs in the atlas; allow the atlas to be dumped in the demo 2017-01-30 20:04:39 -08:00
Patrick Walton 5bccf88445 Make zooming work better; fix atlas sizing bugs 2017-01-30 18:33:44 -08:00
Patrick Walton a927294790 Add rudimentary support for TTC 2017-01-27 13:01:21 -08:00
Patrick Walton 8fbb875654 Stop leaking glyph buffers 2017-01-27 11:31:24 -08:00
Patrick Walton 04ae5651ec Add more text to the Lorem Ipsum demo and fix handling of empty glyphs
in the loca table
2017-01-26 20:56:14 -08:00
Patrick Walton 89a2bf54b0 Add a new example and a toy shaper 2017-01-26 18:53:50 -08:00
Patrick Walton 1deaf9136e Don't require users of the library to load OTF tables individually 2017-01-26 10:27:38 -08:00
Patrick Walton 30daf10cdd Fix syntax on Linux; drop GL version to 3.3 2017-01-25 20:25:54 -08:00
Patrick Walton 2f181f23aa Add a draft GLSL accumulation step, currently untested 2017-01-25 19:22:04 -08:00
Patrick Walton 1336bb790e Add a geometry-shader-based path for debugging.
This is useful for testing via llvmpipe or softpipe on Linux, because
no software Mesa backend supports tessellation shaders.
2017-01-25 18:53:11 -08:00
Patrick Walton d5b61e382e Get things basically working 2017-01-25 17:08:00 -08:00
Patrick Walton 50ad78db2a Draft end-to-end support for the new algorithm. Not working yet. 2017-01-24 15:30:14 -08:00
Patrick Walton 1cd3a1e6bd Migrate the glyph buffers to be OpenGL buffers 2017-01-23 22:03:40 -08:00
Patrick Walton 0569831969 Fix shader compilation errors; convert the coverage buffer to a texture 2017-01-23 19:39:51 -08:00
Patrick Walton f1ec3385de Draft shader code for the new tessellation-based algorithm 2017-01-23 15:33:12 -08:00
Patrick Walton bdf6ebab24 Draft complete end-to-end code. Not working yet. 2017-01-11 20:44:10 -08:00
Patrick Walton 7056a7632b Create buffers and create skeleton OpenCL shaders 2017-01-10 19:57:08 -08:00
Patrick Walton d59bafced1 Implement batch creation 2017-01-10 13:37:01 -08:00
Patrick Walton 941aaea676 Encode contours. 0.3-0.4 µs per glyph or so. 2017-01-09 19:49:00 -08:00
Patrick Walton fd73145b9d Remove some debugging printlns 2017-01-09 18:32:56 -08:00
Patrick Walton 53c481b8a4 Add missing license header piece 2017-01-09 18:32:00 -08:00
Patrick Walton abd8fb8e7b Parse enough of the OTF format to be able to dump outlines 2017-01-09 18:29:41 -08:00
Patrick Walton ce811c0e48 Implement the atlas 2017-01-07 11:52:45 -08:00
Patrick Walton 34cd1ef9b0 Initial commit 2017-01-06 23:49:45 -08:00