Giter VIP home page Giter VIP logo

Comments (6)

squix78 avatar squix78 commented on July 22, 2024

Hi Hallard

It is actually easier than that: just paste the content of this file into a .java file, modify the font names in the main method, compile it and after running it you will get the header file as dump on the command line: https://github.com/squix78/esp8266-oled-ssd1306-font-converter/blob/master/src/main/java/ch/squix/esp8266/fontconverter/rest/FontConverterV3.java

Please close this issue if you succeeded

from esp8266-oled-ssd1306-font-converter.

hallard avatar hallard commented on July 22, 2024

Well everytime time I'm trying doing something with java, it's a pain (may be he knows I'm not fan of it ;-) ), I'm on Windows 10 x64 here the result :

Compilation works fine .class is generated but can't execute it

image

Here the folder files

image

from esp8266-oled-ssd1306-font-converter.

squix78 avatar squix78 commented on July 22, 2024

That's easy to solve: open the source file, remove the first line and compile it again. This worked for me...
Explanation: the line with the package statement defines the location where the class could be found. If you remove the statement it will be in the default package which is where you currently are

from esp8266-oled-ssd1306-font-converter.

hallard avatar hallard commented on July 22, 2024

Yeah you got it, works ;-)

Not sure to understand font size, look these 2 lines ? why one is size 42 and the other 21 ?

I need to put both size same (and both names of course) ?

      FontConverterV3 app = new FontConverterV3(new Font("Meteocons", Font.PLAIN, 42));
      app.printLetterData(builder);
      app = new FontConverterV3(new Font("Meteocons", Font.PLAIN, 21));

from esp8266-oled-ssd1306-font-converter.

squix78 avatar squix78 commented on July 22, 2024

This code actually creates two font types at once. For efficiency reasons "Font Type" is not what you are used from TTF fonts that scale as much as you want. You create a font type for a family, style (bold, italic, etc) and size. If you need another size you create another font type...

from esp8266-oled-ssd1306-font-converter.

hallard avatar hallard commented on July 22, 2024

Thanks, got it,
Makes sense, does this mean that output result will have 2 sizes, one 42 and the other 21?

Yeah, It's clear for style, but on my font style, I've got 4 (see picture below)
image

So I can use it with java style, I suppose this mapping
Font.PLAIN => Normal
Font.BOLD => Gras
But do you know how do I target "Léger" and "Moyen" ?

from esp8266-oled-ssd1306-font-converter.

Related Issues (7)

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.