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

14
LINES

< > BotCompany Repo | #1005872 // Try rendering one line in every local font

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

Libraryless. Click here for Pure Java version (2695L/19K/71K).

1  
!752
2  
3  
static float size = 40f;
4  
sS text = "01"; //"Hello Font.";
5  
6  
p {
7  
  new L<L> data;
8  
  for (S font : localFontFamilies()) pcall {
9  
    print("Rendering in " + font + "...");
10  
    data.add(ll(font, renderText(new Font(font, Font.PLAIN, (int) size), size, text)));
11  
  }
12  
  showTableWithImages(quote(text) + " in every local font (size \*size*/)",
13  
    ll("Font Name", "Text"), data).setRowHeight(max(30, iround(size*5/4)));
14  
}

Author comment

Began life as a copy of #1005870

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1005872
Snippet name: Try rendering one line in every local font
Eternal ID of this version: #1005872/1
Text MD5: 4f214b0af4afe2f3623a3737d38ae3c5
Transpilation MD5: 7fb27a4025cf59120e1021f4ada2d9e5
Author: stefan
Category: javax / gui
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-11 16:05:32
Source code size: 432 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 514 / 636
Referenced in: [show references]