Code Monkey home page Code Monkey logo

ttf2ugui's People

Contributors

arizuu avatar deividalfa avatar jarekkt avatar joyhope avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ttf2ugui's Issues

Support for simplified Chinese

Dear AriZuu,
When I use ugui, I can't support simplified Chinese. I try to use ttf2ugui to convert font, and I can't convert Chinese to C array. Do you have any good suggestions?
Thank You。

Font definition doesn't match uGUI v0.3

I'm trying to use the tool to convert fonts, but get errors when I include them.
In uGUI v0.3, the structure definition for a font is:

typedef struct { unsigned char* p; UG_S16 char_width; UG_S16 char_height; } UG_FONT;

But ttf2ugui creates a structure definition with the following format:
const UG_FONT font_NAME_SIZE = { (unsigned char*)pointer_to_font, FONT_TYPE_1BPP, charWidth, charHeight, startChar, endChar, Name };

Did you modify ugui to use the extra parameters or do I have the wrong version?

Many thanks.

Run on mac

The utility runs on Mac (surprise!), but one needs to install freetype:

brew install freetype

When running, use the full path to the font ttf, e.g.:
./ttf2ugui --font /System/Library/Fonts/Supplemental/Arial.ttf --dpi 140 --size 14 --dump

question for code

uint8_t b = bits[(i*bpp_mul+i_idx) * face->glyph->bitmap.pitch + ((j*bpp_mul+j_idx) / 8)];
The logic is hard to understand. i_idx, j_idx is possible in the range [0, 16), the first part i_idx* pitch, the second part j_idx/8 , I feel it is strange.

Is it possible to explain the meaning of the code? I feel it tries to change the pixel pitch from 16bit to 8bit bpp. the i_idx, j_idx is [0, 16) loop, the b value got from the buffer is not understandable.

Arabic or Persian Fonts

Dear AriZuu,
you've done a great job in this project; I 've just wanted to ask you how to make this project work for Arabic or Persian fonts?

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.