1 | static Font loadFont(S snippetID) ctex { |
2 | return loadFont(snippetID, 12f); |
3 | } |
4 | |
5 | static Font loadFont(InputStream in) ctex { |
6 | return Font.createFont(Font.TRUETYPE_FONT, in); |
7 | } |
8 | |
9 | static Font loadFont(S snippetID, float fontSize) { |
10 | ret loadFont(loadLibrary(snippetID), fontSize); |
11 | } |
12 | |
13 | static Font loadFont(File f, float fontSize) ctex { |
14 | return Font.createFont(Font.TRUETYPE_FONT, f).deriveFont(fontSize); |
15 | } |
16 | |
17 | static Font loadFont(InputStream in, float fontSize) ctex { |
18 | return Font.createFont(Font.TRUETYPE_FONT, in).deriveFont(fontSize); |
19 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lnbujpyubztb, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1000994 |
Snippet name: | loadFont - load Java font (.ttf/.otf) from a snippet or file |
Eternal ID of this version: | #1000994/5 |
Text MD5: | b56b1b47c5fdba248439ec3ab5115005 |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-06-30 20:22:06 |
Source code size: | 556 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 709 / 1273 |
Version history: | 4 change(s) |
Referenced in: | [show references] |