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

13
LINES

< > BotCompany Repo | #1004610 // loadFont_cached (accepts snippet ID)

JavaX fragment (include)

1  
static new Map<S, Font> loadFont_cached_cache;
2  
3  
static synchronized Font loadFont_cached(S snippetID) ctex {
4  
  snippetID = formatSnippetID(snippetID);
5  
  Font f = loadFont_cached_cache.get(snippetID);
6  
  if (f == null)
7  
    loadFont_cached_cache.put(snippetID, f = loadFont(snippetID, 12f));
8  
  ret f;
9  
}
10  
11  
static synchronized Font loadFont_cached(S snippetID, float size) ctex {
12  
  ret loadFont_cached(snippetID).deriveFont(size);
13  
}

Author comment

Began life as a copy of #1000994

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: #1004610
Snippet name: loadFont_cached (accepts snippet ID)
Eternal ID of this version: #1004610/3
Text MD5: 1a66abefadde7041996a708922b6fed1
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-20 19:05:06
Source code size: 438 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 535 / 586
Version history: 2 change(s)
Referenced in: [show references]