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

5
LINES

< > BotCompany Repo | #1034604 // fontWithSpacing (derive font with changed "tracking" attribute, tracking = extra spacing per character)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (49L/1K).

import java.awt.font.TextAttribute;

static Font fontWithSpacing(double spacing, Font font) {
  ret font.deriveFont(litmap(TextAttribute.TRACKING, spacing));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034604
Snippet name: fontWithSpacing (derive font with changed "tracking" attribute, tracking = extra spacing per character)
Eternal ID of this version: #1034604/2
Text MD5: 2f241f1f7b71bc823eca2a4b88696ff0
Transpilation MD5: 67b9e4c7da0d127ade050144a91295c3
Author: stefan
Category: javax / desktop
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-20 19:53:04
Source code size: 163 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 87 / 125
Version history: 1 change(s)
Referenced in: [show references]