| Package | Description |
|---|---|
| rst.pdfbox.layout.text | |
| rst.pdfbox.layout.text.annotations | |
| rst.pdfbox.layout.util |
| Modifier and Type | Field and Description |
|---|---|
protected static FontDescriptor |
ControlFragment.DEFAULT_FONT_DESCRIPTOR |
| Modifier and Type | Method and Description |
|---|---|
FontDescriptor |
ControlFragment.getFontDescriptor() |
FontDescriptor |
StyledText.getFontDescriptor() |
FontDescriptor |
TextFragment.getFontDescriptor() |
| Modifier and Type | Method and Description |
|---|---|
static float |
TextSequenceUtil.getEmWidth(FontDescriptor fontDescriptor)
Returns the width of the character
M in the given font. |
static float |
TextSequenceUtil.getStringWidth(String text,
FontDescriptor fontDescriptor)
Returns the width of the given text in the given font.
|
float |
SpaceUnit.toPt(float size,
FontDescriptor fontDescriptor)
Converts the given unit to pt.
|
| Constructor and Description |
|---|
ControlFragment(String text,
FontDescriptor fontDescriptor) |
ControlFragment(String name,
String text,
FontDescriptor fontDescriptor,
Color color) |
Indent(String label,
float indentWidth,
SpaceUnit indentUnit,
FontDescriptor fontDescriptor,
Alignment alignment,
Color color)
Creates a new line with the given font descriptor.
|
NewLine(FontDescriptor fontDescriptor)
Creates a new line with the given font descriptor.
|
ReplacedWhitespace(String replacedSpace,
FontDescriptor fontDescriptor) |
StyledText(String text,
FontDescriptor fontDescriptor)
Creates a styled text.
|
StyledText(String text,
FontDescriptor fontDescriptor,
Color color)
Creates a styled text.
|
StyledText(String text,
FontDescriptor fontDescriptor,
Color color,
float baselineOffset,
float leftMargin,
float rightMargin)
Creates a styled text.
|
WrappingNewLine(FontDescriptor fontDescriptor)
|
| Constructor and Description |
|---|
AnnotatedStyledText(String text,
FontDescriptor fontDescriptor,
Color color,
float leftMargin,
float rightMargin,
float baselineOffset,
Collection<? extends Annotation> annotations)
Creates a styled text.
|
| Modifier and Type | Method and Description |
|---|---|
Pair<String> |
WordBreaker.breakWord(String word,
FontDescriptor fontDescriptor,
float maxWidth,
boolean breakHardIfNecessary)
Breaks the word in order to fit the given maximum width.
|
Pair<String> |
WordBreakers.NonBreakingWordBreaker.breakWord(String word,
FontDescriptor fontDescriptor,
float maxWidth,
boolean breakHardIfNecessary) |
Pair<String> |
WordBreakers.AbstractWordBreaker.breakWord(String word,
FontDescriptor fontDescriptor,
float maxWidth,
boolean breakHardIfNecessary) |
protected Pair<String> |
WordBreakers.AbstractWordBreaker.breakWordHard(String word,
FontDescriptor fontDescriptor,
float maxWidth)
Breaks the word hard at the outermost position that fits the given
max width.
|
protected abstract Pair<String> |
WordBreakers.AbstractWordBreaker.breakWordSoft(String word,
FontDescriptor fontDescriptor,
float maxWidth)
To be implemented by subclasses.
|
protected Pair<String> |
WordBreakers.DefaultWordBreaker.breakWordSoft(String word,
FontDescriptor fontDescriptor,
float maxWidth) |
Copyright © 2021. All rights reserved.