Class SpriteFontContentWriter
- Assembly
- MonoGame.Framework.Content.Pipeline.dll
[ContentTypeWriter]
public class SpriteFontContentWriter : ContentTypeWriter<SpriteFontContent>
- Inheritance
-
SpriteFontContentWriter
- Inherited Members
Methods
GetRuntimeReader(TargetPlatform)
Gets the assembly qualified name of the runtime loader for this type.
public override string GetRuntimeReader(TargetPlatform targetPlatform)
Parameters
targetPlatform
TargetPlatformName of the platform.
Returns
- string
Name of the runtime loader.
GetRuntimeType(TargetPlatform)
Gets the assembly qualified name of the runtime target type. The runtime target type often matches the design time type, but may differ.
public override string GetRuntimeType(TargetPlatform targetPlatform)
Parameters
targetPlatform
TargetPlatformThe target platform.
Returns
- string
The qualified name.
ShouldCompressContent(TargetPlatform, object)
Indicates whether a given type of content should be compressed.
protected override bool ShouldCompressContent(TargetPlatform targetPlatform, object value)
Parameters
targetPlatform
TargetPlatformThe target platform of the content build.
value
objectThe object about to be serialized, or null if a collection of objects is to be serialized.
Returns
- bool
true if the content of the requested type should be compressed; false otherwise.
Remarks
This base class implementation of this method always returns true. It should be overridden to return false if there would be little or no useful reduction in size of the content type's data from a general-purpose lossless compression algorithm. The implementations for Song Class and SoundEffect Class data return false because data for these content types is already in compressed form.
Write(ContentWriter, SpriteFontContent)
Compiles a strongly typed object into binary format.
protected override void Write(ContentWriter output, SpriteFontContent value)
Parameters
output
ContentWriterThe content writer serializing the value.
value
SpriteFontContentThe value to write.