Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

26
LINES

< > BotCompany Repo | #1004648 // Make Word Glyph Sheet For Learning A Font

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (4246L/29K/94K).

!752

sS fontID = "#1004569"; // "Ticketing"
static float fontSize = 30f;

static BWImage img;

p {
  long time = now();
  new L<BWImage> images;
  for (int i = 0; i < 16; i++) {
    S title = randomID(12);
    print(title);
    BWImage img = new BWImage(renderText(fontID, fontSize, title));
    images.add(subtitle(img, title));
  }
    
  img = clusterImages(images);
  done_always(time, "Making glyph image (" + img.getWidth() + "/" + img.getHeight() + ")");
  
  final S title = "Glyph Word Sheet " + md5OfBWImage(img) + " For Font " 
    + quote(getSnippetTitle(fontID)) + " (" + fsi(fontID) + ") Size " + fontSize;
  addToWindow(showBWImage(title, img), jbutton("Upload", r {
    messageBox(uploadImage(title, toPNG(img.getBufferedImage())));
  }));
}

Author comment

Began life as a copy of #1004630

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004648
Snippet name: Make Word Glyph Sheet For Learning A Font
Eternal ID of this version: #1004648/1
Text MD5: a0a94ca30f90eb74d128abfa91d2b4f6
Transpilation MD5: 8793bc4453eea48eb3746d665e8443f8
Author: stefan
Category: javax / images
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-08-24 20:21:24
Source code size: 785 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 651 / 929
Referenced in: #1003253 - New Homepage (LIVE)