public interface FontManagerBuilder
FontManager
instances.FontManagers.startBuilding(String)
Modifier and Type | Method and Description |
---|---|
FontManagerFuture |
finish()
Signal the end of the building process.
|
FontManagerBuilder |
with(File file)
Read a font from the given file and add it to the
FontManager under construction. |
FontManagerBuilder |
with(FontSource fontSource)
Add the given
FontSource to the FontManager under construction. |
FontManagerBuilder |
with(FontStreamProvider fontStreamProvider)
Read a font from the given
FontStreamProvider and add it to the FontManager under
construction. |
FontManagerBuilder |
with(InputStream stream)
Read a font from the given stream and add it to the
FontManager under construction. |
FontManagerBuilder |
with(Iterable<? extends FontSource> fontSources)
Adds a collection of
FontSource s to the FontManager under construction. |
FontManagerBuilder |
with(Path path)
Read a font from the file or directory (recursively) found under the given path and add it to the
FontManager under
construction. |
FontManagerBuilder |
with(String path)
Read a font from the file or directory (recursively) found under the given path and add it to the
FontManager under
construction. |
FontManagerBuilder |
withStandard14()
If available, read the open source Standard 14 replacement fonts from the class path and add them
to the
FontManager under construction. |
FontManagerBuilder |
withSystemFonts()
Add all fonts found in the operating system's usual font directories.
|
FontManagerBuilder with(File file)
FontManager
under construction.
Problems will be logged using the message FontManagerMessages.FAILED_TO_CLASSIFY_FONT
.file
- a font file (e.g. TrueType, Type1). Must not be null
.FontManagerBuilder with(Path path)
FontManager
under
construction. Problems will be logged using the message
FontManagerMessages.FAILED_TO_CLASSIFY_FONT
.path
- location of a font file (e.g. TrueType, Type1) or directory containing fonts. Must not be null
.FontManagerBuilder with(String path)
FontManager
under
construction. Problems will be logged using the message
FontManagerMessages.FAILED_TO_CLASSIFY_FONT
.path
- location of a font file (e.g. TrueType, Type1) or directory containing fonts as String. Must not be null
.FontManagerBuilder with(InputStream stream)
FontManager
under construction.
Problems will be logged using the message FontManagerMessages.FAILED_TO_CLASSIFY_FONT
.stream
- stream holding the data for a persisted font (e.g. TrueType, Type1). Must not be
null
.FontManagerBuilder with(FontSource fontSource)
FontSource
to the FontManager
under construction. The
FontSource
is not validated/verified in any way.fontSource
- the FontSource
to be added as-is. Must not be null
.FontManagerBuilder with(Iterable<? extends FontSource> fontSources)
FontSource
s to the FontManager
under construction. The
FontSource
are not validated/verified in any way.fontSources
- the FontSource
s to be added as they are. Must not be
null
. If it is empty, nothing happens. If it contains null
elements, they will be ignored.FontManagerBuilder with(FontStreamProvider fontStreamProvider)
FontStreamProvider
and add it to the FontManager
under
construction.fontStreamProvider
- provides a stream holding the data for a persisted font (e.g. TrueType,
Type1). Must not be null
.FontManagerBuilder withSystemFonts()
FontManagerBuilder withStandard14()
FontManager
under construction. This requires the levigo Standard 14 fonts JAR to
be on the classpath.FontManagerFuture finish()
FontManager
under construction might not be ready yet. As a consequence, in case of
asynchronous construction, Future.get()
should be invoked as late as possible
for this will increase the likelihood of construction being completed.FontManagerFuture
which will eventually yield the FontManager
under
construction. If construction was performed synchronously, the FontManager
is
available immediately. Otherwise its construction may still carry on asynchronously.Copyright © 2024 levigo holding gmbh. All rights reserved.