* @return true if font engine may return glyphs from font bitmaps instead of from outlines
...
...
@@ -112,13 +118,19 @@ class Font : Managed {
/**
* @return true if glyphs may be drawn at sub-pixel offsets
*/
valisSubpixel:Boolean
varisSubpixel:Boolean
get()=try{
Stats.onNativeCall()
_nIsSubpixel(_ptr)
}finally{
reachabilityBarrier(this)
}
set(value)=try{
Stats.onNativeCall()
_nSetSubpixel(_ptr,value)
}finally{
reachabilityBarrier(this)
}
/**
* @return true if font and glyph metrics are requested to be linearly scalable
...
...
@@ -138,13 +150,19 @@ class Font : Managed {
*
* @return true if bold is approximated through stroke width
*/
valisEmboldened:Boolean
varisEmboldened:Boolean
get()=try{
Stats.onNativeCall()
_nIsEmboldened(_ptr)
}finally{
reachabilityBarrier(this)
}
set(value)=try{
Stats.onNativeCall()
_nSetEmboldened(_ptr,value)
}finally{
reachabilityBarrier(this)
}
/**
* Returns true if baselines will be snapped to pixel positions when the current transformation
...
...
@@ -152,130 +170,53 @@ class Font : Managed {
*
* @return true if baselines may be snapped to pixels
*/
valisBaselineSnapped:Boolean
varisBaselineSnapped:Boolean
get()=try{
Stats.onNativeCall()
_nIsBaselineSnapped(_ptr)
}finally{
reachabilityBarrier(this)
}
/**
* Sets whether to always hint glyphs. If forceAutoHinting is set, instructs the font manager to always hint glyphs. Only affects platforms that use FreeType as the font manager.
*
* @param value setting to always hint glyphs
* @return this
*/
funsetAutoHintingForced(value:Boolean):Font{
Stats.onNativeCall()
_nSetAutoHintingForced(_ptr,value)
returnthis
}
/**
* Requests, but does not require, to use bitmaps in fonts instead of outlines.
*
* @param value setting to use bitmaps in fonts
* @return this
*/
funsetBitmapsEmbedded(value:Boolean):Font{
Stats.onNativeCall()
_nSetBitmapsEmbedded(_ptr,value)
returnthis
}
/**
* Requests, but does not require, that glyphs respect sub-pixel positioning.
*
* @param value setting for sub-pixel positioning
* @return this
*/
funsetSubpixel(value:Boolean):Font{
Stats.onNativeCall()
_nSetSubpixel(_ptr,value)
returnthis
}
/**
* Requests, but does not require, linearly scalable font and glyph metrics.
*
* For outline fonts 'true' means font and glyph metrics should ignore hinting and rounding.
* Note that some bitmap formats may not be able to scale linearly and will ignore this flag.
*
* @param value setting for linearly scalable font and glyph metrics.
* @return this
*/
funsetMetricsLinear(value:Boolean):Font{
Stats.onNativeCall()
_nSetMetricsLinear(_ptr,value)
returnthis
}
/**
* Increases stroke width when creating glyph bitmaps to approximate a bold typeface.
*
* @param value setting for bold approximation
* @return this
*/
funsetEmboldened(value:Boolean):Font{
Stats.onNativeCall()
_nSetEmboldened(_ptr,value)
returnthis
}
/**
* Requests that baselines be snapped to pixels when the current transformation matrix is axis
* aligned.
*
* @param value setting for baseline snapping to pixels
* @return this
*/
funsetBaselineSnapped(value:Boolean):Font{
Stats.onNativeCall()
_nSetBaselineSnapped(_ptr,value)
returnthis
}
set(value)=try{
Stats.onNativeCall()
_nSetBaselineSnapped(_ptr,value)
}finally{
reachabilityBarrier(this)
}
/**
* Whether edge pixels draw opaque or with partial transparency.
*/
valedging:FontEdging
varedging:FontEdging
get()=try{
Stats.onNativeCall()
FontEdging.values().get(_nGetEdging(_ptr))
}finally{
reachabilityBarrier(this)
}
/**
* Requests, but does not require, that edge pixels draw opaque or with
* partial transparency.
*/
funsetEdging(value:FontEdging):Font{
Stats.onNativeCall()
_nSetEdging(_ptr,value.ordinal)
returnthis
}
set(value)=try{
Stats.onNativeCall()
_nSetEdging(_ptr,value.ordinal)
}finally{
reachabilityBarrier(this)
}
/**
* @return level of glyph outline adjustment
*/
valhinting:FontHinting
varhinting:FontHinting
get()=try{
Stats.onNativeCall()
FontHinting.values().get(_nGetHinting(_ptr))
}finally{
reachabilityBarrier(this)
}
/**
* Sets level of glyph outline adjustment. Does not check for valid values of hintingLevel.
*/
funsetHinting(value:FontHinting):Font{
Stats.onNativeCall()
_nSetHinting(_ptr,value.ordinal)
returnthis
}
set(value)=try{
Stats.onNativeCall()
_nSetHinting(_ptr,value.ordinal)
}finally{
reachabilityBarrier(this)
}
/**
* Returns a font with the same attributes of this font, but with the specified size.
...
...
@@ -310,35 +251,54 @@ class Font : Managed {
/**
* @return text size in points
*/
valsize:Float
varsize:Float
get()=try{
Stats.onNativeCall()
Font_nGetSize(_ptr)
}finally{
reachabilityBarrier(this)
}
set(value)=try{
Stats.onNativeCall()
_nSetSize(_ptr,value)
}finally{
reachabilityBarrier(this)
}
/**
* @return text scale on x-axis. Default value is 1
*/
valscaleX:Float
varscaleX:Float
get()=try{
Stats.onNativeCall()
_nGetScaleX(_ptr)
}finally{
reachabilityBarrier(this)
}
set(value)=try{
Stats.onNativeCall()
_nSetScaleX(_ptr,value)
}finally{
reachabilityBarrier(this)
}
/**
* @return text skew on x-axis. Default value is 0
*/
valskewX:Float
varskewX:Float
get()=try{
Stats.onNativeCall()
_nGetSkewX(_ptr)
}finally{
reachabilityBarrier(this)
}
set(value)=try{
Stats.onNativeCall()
_nSetSkewX(_ptr,value)
}finally{
reachabilityBarrier(this)
}
/**
* Sets Typeface to typeface. Pass null to use the default typeface.
...
...
@@ -356,33 +316,6 @@ class Font : Managed {
}
}
/**
* Sets text size in points. Has no effect if value is not greater than or equal to zero.