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).

1  
!752
2  
3  
sS fontID = "#1004569"; // "Ticketing"
4  
static float fontSize = 30f;
5  
6  
static BWImage img;
7  
8  
p {
9  
  long time = now();
10  
  new L<BWImage> images;
11  
  for (int i = 0; i < 16; i++) {
12  
    S title = randomID(12);
13  
    print(title);
14  
    BWImage img = new BWImage(renderText(fontID, fontSize, title));
15  
    images.add(subtitle(img, title));
16  
  }
17  
    
18  
  img = clusterImages(images);
19  
  done_always(time, "Making glyph image (" + img.getWidth() + "/" + img.getHeight() + ")");
20  
  
21  
  final S title = "Glyph Word Sheet " + md5OfBWImage(img) + " For Font " 
22  
    + quote(getSnippetTitle(fontID)) + " (" + fsi(fontID) + ") Size " + fontSize;
23  
  addToWindow(showBWImage(title, img), jbutton("Upload", r {
24  
    messageBox(uploadImage(title, toPNG(img.getBufferedImage())));
25  
  }));
26  
}

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: 652 / 930
Referenced in: [show references]