Giter Club home page Giter Club logo

libschrift-show's Introduction

libschrift-show

This is a program to test the features of libschrift, a lightweight TrueType font rendering library. Unlike the demos in libschrift, show.c does not depend on any graphics environment: it generates a PGM file, which can be viewed virtually everywhere.

The code in show.c is hereby placed in the public domain and also under the MIT license.

See the LICENSE file for copyright and license details on the code in schrift.c and schrift.h.

libschrift-show's People

Contributors

lhf avatar

Stargazers

 avatar

Watchers

 avatar

libschrift-show's Issues

Windows: Broken file output because of newline translation

Hi,

First off thank you for providing this demo program!

I've noticed that on Windows, it produces skewed images such as this one:
libschrift-show
This is because your demo writes binary pixel values to stdout, which typically contain some 0x0A (Line Feed) bytes here and there.
Because Windows uses CR LF newlines, and stdout is usually in text mode (think fopen(,"w"), as opposed to fopen(,"wb")),
these 0x0A bytes will be replaced by a 0x0D 0x0A (CR LF) sequence during fwrite().
Consider writing images to a file instead of to the console.
Alternatively, you could use something like setmode(fileno(stdout), O_BINARY) on Windows to force stdout into binary mode.

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.