Coder Social home page Coder Social logo

glifrenderer.rlib's Introduction

glifrenderer.rlib

A Skia renderer that takes an MFEK glyph and draws it out to the canvas.

This library is used in both MFEKufo and MFEKglif, and is used to promote code reuse between the two. It may be useful for other font related free software projects as well.

License

Copyright 2021 Matthew Blanchard, Fredrick R. Brennan & MFEK Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this software or any of the provided source code files except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.  See the License for the
specific language governing permissions and limitations under the License.

glifrenderer.rlib's People

Contributors

ctrlcctrlv avatar eliheuer avatar matthewblanchard avatar subject38 avatar

Watchers

 avatar  avatar  avatar

glifrenderer.rlib's Issues

Consider adding some indirection around point drawing to speed up the TT2020 case

Drawing TT2020 glyphs is possible, but renders on my machine at only around 15FPS. Not as bad as FontForge's 0.33FPS, but not ideal.

I think it's mostly due to how many paths we're creating. (perf backs this theory up if I'm reading it right.) I think I can solve this with a little good old fashioned indirection, by drawing every point that will be the same color/stroke width in a single path.

15 FPS:
image

60+ FPS:
image

(Also, we probably shouldn't draw selected points twice, but this isn't as big a problem as creating thousands of Paths/Paints.)

Rust iterators should make this easier. Basically the current draw_point will just add a rect/triangle/circle to a one-per-render_frame struct, then we'll draw all the points with only four or five Paths/Paints.

This might be post-1.0 as it's premature optimization, but am writing it down so don't forget.

Needs a preview widget

In @eliheuer's exposition of MFEK/glif#235 he linked a cool image

image

I assume this is a heavily stylized Runebender (if so, good news for me, for MFEKglif is finally handily beating them in tool count, meaning we are rapidly closing the feature gap and will soon, (once we have a font overview in the form of MFEKufo) be able to declare MFEK does everything Runebender can).

So, this issue is just one of Runebender competition, we need that preview widget thing. It's also a cool feature, besides my competitive spirit, hehe.

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.