gi-harfbuzz-0.0.10: HarfBuzz bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.HarfBuzz.Functions

Contents

- Methods
  - aatLayoutFeatureTypeGetNameId
  - aatLayoutFeatureTypeGetSelectorInfos
  - aatLayoutGetFeatureTypes
  - aatLayoutHasPositioning
  - aatLayoutHasSubstitution
  - aatLayoutHasTracking
  - blobCopyWritableOrFail
  - blobCreateFromFile
  - blobCreateFromFileOrFail
  - blobCreateSubBlob
  - blobGetData
  - blobGetDataWritable
  - blobGetEmpty
  - blobGetLength
  - blobIsImmutable
  - blobMakeImmutable
  - bufferAdd
  - bufferAddCodepoints
  - bufferAddLatin1
  - bufferAddUtf16
  - bufferAddUtf32
  - bufferAddUtf8
  - bufferAllocationSuccessful
  - bufferAppend
  - bufferClearContents
  - bufferCreate
  - bufferCreateSimilar
  - bufferDeserializeGlyphs
  - bufferDeserializeUnicode
  - bufferDiff
  - bufferGetClusterLevel
  - bufferGetContentType
  - bufferGetDirection
  - bufferGetEmpty
  - bufferGetFlags
  - bufferGetGlyphInfos
  - bufferGetGlyphPositions
  - bufferGetInvisibleGlyph
  - bufferGetLanguage
  - bufferGetLength
  - bufferGetNotFoundGlyph
  - bufferGetNotFoundVariationSelectorGlyph
  - bufferGetRandomState
  - bufferGetReplacementCodepoint
  - bufferGetScript
  - bufferGetSegmentProperties
  - bufferGetUnicodeFuncs
  - bufferGuessSegmentProperties
  - bufferHasPositions
  - bufferNormalizeGlyphs
  - bufferPreAllocate
  - bufferReset
  - bufferReverse
  - bufferReverseClusters
  - bufferReverseRange
  - bufferSerialize
  - bufferSerializeFormatFromString
  - bufferSerializeFormatToString
  - bufferSerializeGlyphs
  - bufferSerializeListFormats
  - bufferSerializeUnicode
  - bufferSetClusterLevel
  - bufferSetContentType
  - bufferSetDirection
  - bufferSetFlags
  - bufferSetInvisibleGlyph
  - bufferSetLanguage
  - bufferSetLength
  - bufferSetNotFoundGlyph
  - bufferSetNotFoundVariationSelectorGlyph
  - bufferSetRandomState
  - bufferSetReplacementCodepoint
  - bufferSetScript
  - bufferSetSegmentProperties
  - bufferSetUnicodeFuncs
  - calloc
  - colorGetAlpha
  - colorGetBlue
  - colorGetGreen
  - colorGetRed
  - colorLineGetColorStops
  - colorLineGetExtend
  - directionFromString
  - directionToString
  - drawClosePath
  - drawCubicTo
  - drawFuncsCreate
  - drawFuncsGetEmpty
  - drawFuncsIsImmutable
  - drawFuncsMakeImmutable
  - drawLineTo
  - drawMoveTo
  - drawQuadraticTo
  - faceBuilderAddTable
  - faceBuilderCreate
  - faceBuilderSortTables
  - faceCount
  - faceCreate
  - faceCreateFromFileOrFail
  - faceCreateFromFileOrFailUsing
  - faceCreateOrFail
  - faceCreateOrFailUsing
  - faceGetEmpty
  - faceGetGlyphCount
  - faceGetIndex
  - faceGetTableTags
  - faceGetUpem
  - faceIsImmutable
  - faceListLoaders
  - faceMakeImmutable
  - faceReferenceBlob
  - faceReferenceTable
  - faceSetGlyphCount
  - faceSetIndex
  - faceSetUpem
  - featureFromString
  - featureToString
  - fontAddGlyphOriginForDirection
  - fontChanged
  - fontCreate
  - fontCreateSubFont
  - fontDrawGlyph
  - fontDrawGlyphOrFail
  - fontFuncsCreate
  - fontFuncsGetEmpty
  - fontFuncsIsImmutable
  - fontFuncsMakeImmutable
  - fontGetEmpty
  - fontGetExtentsForDirection
  - fontGetFace
  - fontGetGlyph
  - fontGetGlyphAdvanceForDirection
  - fontGetGlyphAdvancesForDirection
  - fontGetGlyphContourPoint
  - fontGetGlyphContourPointForOrigin
  - fontGetGlyphExtents
  - fontGetGlyphExtentsForOrigin
  - fontGetGlyphFromName
  - fontGetGlyphHAdvance
  - fontGetGlyphHAdvances
  - fontGetGlyphHKerning
  - fontGetGlyphHOrigin
  - fontGetGlyphHOrigins
  - fontGetGlyphKerningForDirection
  - fontGetGlyphName
  - fontGetGlyphOriginForDirection
  - fontGetGlyphShape
  - fontGetGlyphVAdvance
  - fontGetGlyphVAdvances
  - fontGetGlyphVKerning
  - fontGetGlyphVOrigin
  - fontGetGlyphVOrigins
  - fontGetHExtents
  - fontGetNominalGlyph
  - fontGetNominalGlyphs
  - fontGetParent
  - fontGetPpem
  - fontGetPtem
  - fontGetScale
  - fontGetSerial
  - fontGetSyntheticBold
  - fontGetSyntheticSlant
  - fontGetVExtents
  - fontGetVarCoordsDesign
  - fontGetVarCoordsNormalized
  - fontGetVarNamedInstance
  - fontGetVariationGlyph
  - fontGlyphFromString
  - fontGlyphToString
  - fontIsImmutable
  - fontIsSynthetic
  - fontListFuncs
  - fontMakeImmutable
  - fontPaintGlyph
  - fontPaintGlyphOrFail
  - fontSetFace
  - fontSetFuncsUsing
  - fontSetParent
  - fontSetPpem
  - fontSetPtem
  - fontSetScale
  - fontSetSyntheticBold
  - fontSetSyntheticSlant
  - fontSetVarCoordsDesign
  - fontSetVarCoordsNormalized
  - fontSetVarNamedInstance
  - fontSetVariation
  - fontSetVariations
  - fontSubtractGlyphOriginForDirection
  - free
  - ftFaceCreateCached
  - ftFaceCreateFromBlobOrFail
  - ftFaceCreateFromFileOrFail
  - ftFaceCreateReferenced
  - ftFontChanged
  - ftFontCreateReferenced
  - ftFontGetLoadFlags
  - ftFontSetFuncs
  - ftFontSetLoadFlags
  - ftHbFontChanged
  - glibBlobCreate
  - glibGetUnicodeFuncs
  - glibScriptFromScript
  - glibScriptToScript
  - glyphInfoGetGlyphFlags
  - languageFromString
  - languageGetDefault
  - languageMatches
  - languageToString
  - malloc
  - mapAllocationSuccessful
  - mapClear
  - mapCopy
  - mapCreate
  - mapDel
  - mapGet
  - mapGetEmpty
  - mapGetPopulation
  - mapHas
  - mapHash
  - mapIsEmpty
  - mapIsEqual
  - mapKeys
  - mapNext
  - mapSet
  - mapUpdate
  - mapValues
  - otColorGlyphGetLayers
  - otColorGlyphHasPaint
  - otColorGlyphReferencePng
  - otColorGlyphReferenceSvg
  - otColorHasLayers
  - otColorHasPaint
  - otColorHasPalettes
  - otColorHasPng
  - otColorHasSvg
  - otColorPaletteColorGetNameId
  - otColorPaletteGetColors
  - otColorPaletteGetCount
  - otColorPaletteGetFlags
  - otColorPaletteGetNameId
  - otFontSetFuncs
  - otLayoutFeatureGetCharacters
  - otLayoutFeatureGetLookups
  - otLayoutFeatureGetNameIds
  - otLayoutFeatureWithVariationsGetLookups
  - otLayoutGetAttachPoints
  - otLayoutGetBaseline
  - otLayoutGetBaseline2
  - otLayoutGetBaselineWithFallback
  - otLayoutGetBaselineWithFallback2
  - otLayoutGetFontExtents
  - otLayoutGetFontExtents2
  - otLayoutGetGlyphClass
  - otLayoutGetHorizontalBaselineTagForScript
  - otLayoutGetLigatureCarets
  - otLayoutGetSizeParams
  - otLayoutHasGlyphClasses
  - otLayoutHasPositioning
  - otLayoutHasSubstitution
  - otLayoutLanguageFindFeature
  - otLayoutLanguageGetFeatureIndexes
  - otLayoutLanguageGetFeatureTags
  - otLayoutLanguageGetRequiredFeature
  - otLayoutLanguageGetRequiredFeatureIndex
  - otLayoutLookupGetGlyphAlternates
  - otLayoutLookupGetOpticalBound
  - otLayoutLookupWouldSubstitute
  - otLayoutScriptFindLanguage
  - otLayoutScriptGetLanguageTags
  - otLayoutScriptSelectLanguage
  - otLayoutScriptSelectLanguage2
  - otLayoutTableChooseScript
  - otLayoutTableFindFeatureVariations
  - otLayoutTableFindScript
  - otLayoutTableGetFeatureTags
  - otLayoutTableGetLookupCount
  - otLayoutTableGetScriptTags
  - otLayoutTableSelectScript
  - otMathGetConstant
  - otMathGetGlyphAssembly
  - otMathGetGlyphItalicsCorrection
  - otMathGetGlyphKerning
  - otMathGetGlyphKernings
  - otMathGetGlyphTopAccentAttachment
  - otMathGetGlyphVariants
  - otMathGetMinConnectorOverlap
  - otMathHasData
  - otMathIsGlyphExtendedShape
  - otMetaGetEntryTags
  - otMetaReferenceEntry
  - otMetricsGetPosition
  - otMetricsGetPositionWithFallback
  - otMetricsGetVariation
  - otMetricsGetXVariation
  - otMetricsGetYVariation
  - otNameGetUtf16
  - otNameGetUtf32
  - otNameGetUtf8
  - otNameListNames
  - otShapePlanGetFeatureTags
  - otTagFromLanguage
  - otTagToLanguage
  - otTagToScript
  - otTagsFromScript
  - otTagsFromScriptAndLanguage
  - otVarFindAxis
  - otVarFindAxisInfo
  - otVarGetAxes
  - otVarGetAxisCount
  - otVarGetAxisInfos
  - otVarGetNamedInstanceCount
  - otVarHasData
  - otVarNamedInstanceGetDesignCoords
  - otVarNamedInstanceGetPostscriptNameId
  - otVarNamedInstanceGetSubfamilyNameId
  - otVarNormalizeCoords
  - otVarNormalizeVariations
  - paintColor
  - paintColorGlyph
  - paintCustomPaletteColor
  - paintFuncsCreate
  - paintFuncsGetEmpty
  - paintFuncsIsImmutable
  - paintFuncsMakeImmutable
  - paintImage
  - paintLinearGradient
  - paintPopClip
  - paintPopGroup
  - paintPopTransform
  - paintPushClipGlyph
  - paintPushClipRectangle
  - paintPushFontTransform
  - paintPushGroup
  - paintPushInverseFontTransform
  - paintPushTransform
  - paintRadialGradient
  - paintSweepGradient
  - realloc
  - scriptFromIso15924Tag
  - scriptFromString
  - scriptGetHorizontalDirection
  - scriptToIso15924Tag
  - segmentPropertiesEqual
  - segmentPropertiesHash
  - segmentPropertiesOverlay
  - setAdd
  - setAddRange
  - setAddSortedArray
  - setAllocationSuccessful
  - setClear
  - setCopy
  - setCreate
  - setDel
  - setDelRange
  - setGetEmpty
  - setGetMax
  - setGetMin
  - setGetPopulation
  - setHas
  - setHash
  - setIntersect
  - setInvert
  - setIsEmpty
  - setIsEqual
  - setIsInverted
  - setIsSubset
  - setNext
  - setNextMany
  - setNextRange
  - setPrevious
  - setPreviousRange
  - setSet
  - setSubtract
  - setSymmetricDifference
  - setUnion
  - shape
  - shapeFull
  - shapeListShapers
  - shapePlanCreate
  - shapePlanCreate2
  - shapePlanCreateCached
  - shapePlanCreateCached2
  - shapePlanExecute
  - shapePlanGetEmpty
  - shapePlanGetShaper
  - styleGetValue
  - tagFromString
  - unicodeCombiningClass
  - unicodeCompose
  - unicodeDecompose
  - unicodeDecomposeCompatibility
  - unicodeEastasianWidth
  - unicodeFuncsCreate
  - unicodeFuncsGetDefault
  - unicodeFuncsGetEmpty
  - unicodeFuncsGetParent
  - unicodeFuncsIsImmutable
  - unicodeFuncsMakeImmutable
  - unicodeGeneralCategory
  - unicodeMirroring
  - unicodeScript
  - variationFromString
  - variationToString

Description

Synopsis

- aatLayoutFeatureTypeGetNameId :: (HasCallStack, MonadIO m) => FaceT -> AatLayoutFeatureTypeT -> m Word32
- aatLayoutFeatureTypeGetSelectorInfos :: (HasCallStack, MonadIO m) => FaceT -> AatLayoutFeatureTypeT -> Word32 -> [AatLayoutFeatureSelectorInfoT] -> m (Word32, [AatLayoutFeatureSelectorInfoT], Word32)
- aatLayoutGetFeatureTypes :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> [AatLayoutFeatureTypeT] -> m (Word32, [AatLayoutFeatureTypeT])
- aatLayoutHasPositioning :: (HasCallStack, MonadIO m) => FaceT -> m Int32
- aatLayoutHasSubstitution :: (HasCallStack, MonadIO m) => FaceT -> m Int32
- aatLayoutHasTracking :: (HasCallStack, MonadIO m) => FaceT -> m Int32
- blobCopyWritableOrFail :: (HasCallStack, MonadIO m) => BlobT -> m BlobT
- blobCreateFromFile :: (HasCallStack, MonadIO m) => Text -> m BlobT
- blobCreateFromFileOrFail :: (HasCallStack, MonadIO m) => Text -> m BlobT
- blobCreateSubBlob :: (HasCallStack, MonadIO m) => BlobT -> Word32 -> Word32 -> m BlobT
- blobGetData :: (HasCallStack, MonadIO m) => BlobT -> m (Maybe [Text])
- blobGetDataWritable :: (HasCallStack, MonadIO m) => BlobT -> m [Text]
- blobGetEmpty :: (HasCallStack, MonadIO m) => m BlobT
- blobGetLength :: (HasCallStack, MonadIO m) => BlobT -> m Word32
- blobIsImmutable :: (HasCallStack, MonadIO m) => BlobT -> m Int32
- blobMakeImmutable :: (HasCallStack, MonadIO m) => BlobT -> m ()
- bufferAdd :: (HasCallStack, MonadIO m) => BufferT -> Word32 -> Word32 -> m ()
- bufferAddCodepoints :: (HasCallStack, MonadIO m) => BufferT -> [Word32] -> Word32 -> Int32 -> m ()
- bufferAddLatin1 :: (HasCallStack, MonadIO m) => BufferT -> ByteString -> Word32 -> Int32 -> m ()
- bufferAddUtf16 :: (HasCallStack, MonadIO m) => BufferT -> [Word16] -> Word32 -> Int32 -> m ()
- bufferAddUtf32 :: (HasCallStack, MonadIO m) => BufferT -> [Word32] -> Word32 -> Int32 -> m ()
- bufferAddUtf8 :: (HasCallStack, MonadIO m) => BufferT -> ByteString -> Word32 -> Int32 -> m ()
- bufferAllocationSuccessful :: (HasCallStack, MonadIO m) => BufferT -> m Int32
- bufferAppend :: (HasCallStack, MonadIO m) => BufferT -> BufferT -> Word32 -> Word32 -> m ()
- bufferClearContents :: (HasCallStack, MonadIO m) => BufferT -> m ()
- bufferCreate :: (HasCallStack, MonadIO m) => m BufferT
- bufferCreateSimilar :: (HasCallStack, MonadIO m) => BufferT -> m BufferT
- bufferDeserializeGlyphs :: (HasCallStack, MonadIO m) => BufferT -> [Text] -> Maybe FontT -> BufferSerializeFormatT -> m (Int32, Text)
- bufferDeserializeUnicode :: (HasCallStack, MonadIO m) => BufferT -> [Text] -> BufferSerializeFormatT -> m (Int32, Text)
- bufferDiff :: (HasCallStack, MonadIO m) => BufferT -> BufferT -> Word32 -> Word32 -> m [BufferDiffFlagsT]
- bufferGetClusterLevel :: (HasCallStack, MonadIO m) => BufferT -> m BufferClusterLevelT
- bufferGetContentType :: (HasCallStack, MonadIO m) => BufferT -> m BufferContentTypeT
- bufferGetDirection :: (HasCallStack, MonadIO m) => BufferT -> m DirectionT
- bufferGetEmpty :: (HasCallStack, MonadIO m) => m BufferT
- bufferGetFlags :: (HasCallStack, MonadIO m) => BufferT -> m [BufferFlagsT]
- bufferGetGlyphInfos :: (HasCallStack, MonadIO m) => BufferT -> m [GlyphInfoT]
- bufferGetGlyphPositions :: (HasCallStack, MonadIO m) => BufferT -> m [GlyphPositionT]
- bufferGetInvisibleGlyph :: (HasCallStack, MonadIO m) => BufferT -> m Word32
- bufferGetLanguage :: (HasCallStack, MonadIO m) => BufferT -> m LanguageT
- bufferGetLength :: (HasCallStack, MonadIO m) => BufferT -> m Word32
- bufferGetNotFoundGlyph :: (HasCallStack, MonadIO m) => BufferT -> m Word32
- bufferGetNotFoundVariationSelectorGlyph :: (HasCallStack, MonadIO m) => BufferT -> m Word32
- bufferGetRandomState :: (HasCallStack, MonadIO m) => BufferT -> m Word32
- bufferGetReplacementCodepoint :: (HasCallStack, MonadIO m) => BufferT -> m Word32
- bufferGetScript :: (HasCallStack, MonadIO m) => BufferT -> m ScriptT
- bufferGetSegmentProperties :: (HasCallStack, MonadIO m) => BufferT -> m SegmentPropertiesT
- bufferGetUnicodeFuncs :: (HasCallStack, MonadIO m) => BufferT -> m UnicodeFuncsT
- bufferGuessSegmentProperties :: (HasCallStack, MonadIO m) => BufferT -> m ()
- bufferHasPositions :: (HasCallStack, MonadIO m) => BufferT -> m Int32
- bufferNormalizeGlyphs :: (HasCallStack, MonadIO m) => BufferT -> m ()
- bufferPreAllocate :: (HasCallStack, MonadIO m) => BufferT -> Word32 -> m Int32
- bufferReset :: (HasCallStack, MonadIO m) => BufferT -> m ()
- bufferReverse :: (HasCallStack, MonadIO m) => BufferT -> m ()
- bufferReverseClusters :: (HasCallStack, MonadIO m) => BufferT -> m ()
- bufferReverseRange :: (HasCallStack, MonadIO m) => BufferT -> Word32 -> Word32 -> m ()
- bufferSerialize :: (HasCallStack, MonadIO m) => BufferT -> Word32 -> Word32 -> Maybe FontT -> BufferSerializeFormatT -> [BufferSerializeFlagsT] -> m (Word32, ByteString, Word32)
- bufferSerializeFormatFromString :: (HasCallStack, MonadIO m) => ByteString -> m BufferSerializeFormatT
- bufferSerializeFormatToString :: (HasCallStack, MonadIO m) => BufferSerializeFormatT -> m Text
- bufferSerializeGlyphs :: (HasCallStack, MonadIO m) => BufferT -> Word32 -> Word32 -> Maybe FontT -> BufferSerializeFormatT -> [BufferSerializeFlagsT] -> m (Word32, ByteString, Word32)
- bufferSerializeListFormats :: (HasCallStack, MonadIO m) => m [Text]
- bufferSerializeUnicode :: (HasCallStack, MonadIO m) => BufferT -> Word32 -> Word32 -> BufferSerializeFormatT -> [BufferSerializeFlagsT] -> m (Word32, ByteString, Word32)
- bufferSetClusterLevel :: (HasCallStack, MonadIO m) => BufferT -> BufferClusterLevelT -> m ()
- bufferSetContentType :: (HasCallStack, MonadIO m) => BufferT -> BufferContentTypeT -> m ()
- bufferSetDirection :: (HasCallStack, MonadIO m) => BufferT -> DirectionT -> m ()
- bufferSetFlags :: (HasCallStack, MonadIO m) => BufferT -> [BufferFlagsT] -> m ()
- bufferSetInvisibleGlyph :: (HasCallStack, MonadIO m) => BufferT -> Word32 -> m ()
- bufferSetLanguage :: (HasCallStack, MonadIO m) => BufferT -> LanguageT -> m ()
- bufferSetLength :: (HasCallStack, MonadIO m) => BufferT -> Word32 -> m Int32
- bufferSetNotFoundGlyph :: (HasCallStack, MonadIO m) => BufferT -> Word32 -> m ()
- bufferSetNotFoundVariationSelectorGlyph :: (HasCallStack, MonadIO m) => BufferT -> Word32 -> m ()
- bufferSetRandomState :: (HasCallStack, MonadIO m) => BufferT -> Word32 -> m ()
- bufferSetReplacementCodepoint :: (HasCallStack, MonadIO m) => BufferT -> Word32 -> m ()
- bufferSetScript :: (HasCallStack, MonadIO m) => BufferT -> ScriptT -> m ()
- bufferSetSegmentProperties :: (HasCallStack, MonadIO m) => BufferT -> SegmentPropertiesT -> m ()
- bufferSetUnicodeFuncs :: (HasCallStack, MonadIO m) => BufferT -> UnicodeFuncsT -> m ()
- calloc :: (HasCallStack, MonadIO m) => CSize -> CSize -> m (Ptr ())
- colorGetAlpha :: (HasCallStack, MonadIO m) => Word32 -> m Word8
- colorGetBlue :: (HasCallStack, MonadIO m) => Word32 -> m Word8
- colorGetGreen :: (HasCallStack, MonadIO m) => Word32 -> m Word8
- colorGetRed :: (HasCallStack, MonadIO m) => Word32 -> m Word8
- colorLineGetColorStops :: (HasCallStack, MonadIO m) => ColorLineT -> Word32 -> [ColorStopT] -> m (Word32, [ColorStopT])
- colorLineGetExtend :: (HasCallStack, MonadIO m) => ColorLineT -> m PaintExtendT
- directionFromString :: (HasCallStack, MonadIO m) => ByteString -> m DirectionT
- directionToString :: (HasCallStack, MonadIO m) => DirectionT -> m Text
- drawClosePath :: (HasCallStack, MonadIO m) => DrawFuncsT -> Ptr () -> DrawStateT -> m ()
- drawCubicTo :: (HasCallStack, MonadIO m) => DrawFuncsT -> Ptr () -> DrawStateT -> Float -> Float -> Float -> Float -> Float -> Float -> m ()
- drawFuncsCreate :: (HasCallStack, MonadIO m) => m DrawFuncsT
- drawFuncsGetEmpty :: (HasCallStack, MonadIO m) => m DrawFuncsT
- drawFuncsIsImmutable :: (HasCallStack, MonadIO m) => DrawFuncsT -> m Int32
- drawFuncsMakeImmutable :: (HasCallStack, MonadIO m) => DrawFuncsT -> m ()
- drawLineTo :: (HasCallStack, MonadIO m) => DrawFuncsT -> Ptr () -> DrawStateT -> Float -> Float -> m ()
- drawMoveTo :: (HasCallStack, MonadIO m) => DrawFuncsT -> Ptr () -> DrawStateT -> Float -> Float -> m ()
- drawQuadraticTo :: (HasCallStack, MonadIO m) => DrawFuncsT -> Ptr () -> DrawStateT -> Float -> Float -> Float -> Float -> m ()
- faceBuilderAddTable :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> BlobT -> m Int32
- faceBuilderCreate :: (HasCallStack, MonadIO m) => m FaceT
- faceBuilderSortTables :: (HasCallStack, MonadIO m) => FaceT -> [Word32] -> m ()
- faceCount :: (HasCallStack, MonadIO m) => BlobT -> m Word32
- faceCreate :: (HasCallStack, MonadIO m) => BlobT -> Word32 -> m FaceT
- faceCreateFromFileOrFail :: (HasCallStack, MonadIO m) => Text -> Word32 -> m FaceT
- faceCreateFromFileOrFailUsing :: (HasCallStack, MonadIO m) => Text -> Word32 -> Maybe Text -> m FaceT
- faceCreateOrFail :: (HasCallStack, MonadIO m) => BlobT -> Word32 -> m FaceT
- faceCreateOrFailUsing :: (HasCallStack, MonadIO m) => BlobT -> Word32 -> Maybe Text -> m FaceT
- faceGetEmpty :: (HasCallStack, MonadIO m) => m FaceT
- faceGetGlyphCount :: (HasCallStack, MonadIO m) => FaceT -> m Word32
- faceGetIndex :: (HasCallStack, MonadIO m) => FaceT -> m Word32
- faceGetTableTags :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> m (Word32, [Word32])
- faceGetUpem :: (HasCallStack, MonadIO m) => FaceT -> m Word32
- faceIsImmutable :: (HasCallStack, MonadIO m) => FaceT -> m Int32
- faceListLoaders :: (HasCallStack, MonadIO m) => m [Text]
- faceMakeImmutable :: (HasCallStack, MonadIO m) => FaceT -> m ()
- faceReferenceBlob :: (HasCallStack, MonadIO m) => FaceT -> m BlobT
- faceReferenceTable :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> m BlobT
- faceSetGlyphCount :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> m ()
- faceSetIndex :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> m ()
- faceSetUpem :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> m ()
- featureFromString :: (HasCallStack, MonadIO m) => ByteString -> m (Int32, FeatureT)
- featureToString :: (HasCallStack, MonadIO m) => FeatureT -> m [Text]
- fontAddGlyphOriginForDirection :: (HasCallStack, MonadIO m) => FontT -> Word32 -> DirectionT -> Int32 -> Int32 -> m (Int32, Int32)
- fontChanged :: (HasCallStack, MonadIO m) => FontT -> m ()
- fontCreate :: (HasCallStack, MonadIO m) => FaceT -> m FontT
- fontCreateSubFont :: (HasCallStack, MonadIO m) => FontT -> m FontT
- fontDrawGlyph :: (HasCallStack, MonadIO m) => FontT -> Word32 -> DrawFuncsT -> Ptr () -> m ()
- fontDrawGlyphOrFail :: (HasCallStack, MonadIO m) => FontT -> Word32 -> DrawFuncsT -> Ptr () -> m Int32
- fontFuncsCreate :: (HasCallStack, MonadIO m) => m FontFuncsT
- fontFuncsGetEmpty :: (HasCallStack, MonadIO m) => m FontFuncsT
- fontFuncsIsImmutable :: (HasCallStack, MonadIO m) => FontFuncsT -> m Int32
- fontFuncsMakeImmutable :: (HasCallStack, MonadIO m) => FontFuncsT -> m ()
- fontGetEmpty :: (HasCallStack, MonadIO m) => m FontT
- fontGetExtentsForDirection :: (HasCallStack, MonadIO m) => FontT -> DirectionT -> m FontExtentsT
- fontGetFace :: (HasCallStack, MonadIO m) => FontT -> m FaceT
- fontGetGlyph :: (HasCallStack, MonadIO m) => FontT -> Word32 -> Word32 -> m (Int32, Word32)
- fontGetGlyphAdvanceForDirection :: (HasCallStack, MonadIO m) => FontT -> Word32 -> DirectionT -> m (Int32, Int32)
- fontGetGlyphAdvancesForDirection :: (HasCallStack, MonadIO m) => FontT -> DirectionT -> Word32 -> Word32 -> Word32 -> m (Int32, Word32)
- fontGetGlyphContourPoint :: (HasCallStack, MonadIO m) => FontT -> Word32 -> Word32 -> m (Int32, Int32, Int32)
- fontGetGlyphContourPointForOrigin :: (HasCallStack, MonadIO m) => FontT -> Word32 -> Word32 -> DirectionT -> m (Int32, Int32, Int32)
- fontGetGlyphExtents :: (HasCallStack, MonadIO m) => FontT -> Word32 -> m (Int32, GlyphExtentsT)
- fontGetGlyphExtentsForOrigin :: (HasCallStack, MonadIO m) => FontT -> Word32 -> DirectionT -> m (Int32, GlyphExtentsT)
- fontGetGlyphFromName :: (HasCallStack, MonadIO m) => FontT -> [Text] -> m (Int32, Word32)
- fontGetGlyphHAdvance :: (HasCallStack, MonadIO m) => FontT -> Word32 -> m Int32
- fontGetGlyphHAdvances :: (HasCallStack, MonadIO m) => FontT -> Word32 -> Word32 -> Word32 -> Word32 -> m Int32
- fontGetGlyphHKerning :: (HasCallStack, MonadIO m) => FontT -> Word32 -> Word32 -> m Int32
- fontGetGlyphHOrigin :: (HasCallStack, MonadIO m) => FontT -> Word32 -> m (Int32, Int32, Int32)
- fontGetGlyphHOrigins :: (HasCallStack, MonadIO m) => FontT -> Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> m (Int32, Int32, Int32)
- fontGetGlyphKerningForDirection :: (HasCallStack, MonadIO m) => FontT -> Word32 -> Word32 -> DirectionT -> m (Int32, Int32)
- fontGetGlyphName :: (HasCallStack, MonadIO m) => FontT -> Word32 -> m (Int32, [Text])
- fontGetGlyphOriginForDirection :: (HasCallStack, MonadIO m) => FontT -> Word32 -> DirectionT -> m (Int32, Int32)
- fontGetGlyphShape :: (HasCallStack, MonadIO m) => FontT -> Word32 -> DrawFuncsT -> Ptr () -> m ()
- fontGetGlyphVAdvance :: (HasCallStack, MonadIO m) => FontT -> Word32 -> m Int32
- fontGetGlyphVAdvances :: (HasCallStack, MonadIO m) => FontT -> Word32 -> Word32 -> Word32 -> m (Int32, Word32)
- fontGetGlyphVKerning :: (HasCallStack, MonadIO m) => FontT -> Word32 -> Word32 -> m Int32
- fontGetGlyphVOrigin :: (HasCallStack, MonadIO m) => FontT -> Word32 -> m (Int32, Int32, Int32)
- fontGetGlyphVOrigins :: (HasCallStack, MonadIO m) => FontT -> Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> m (Int32, Int32, Int32)
- fontGetHExtents :: (HasCallStack, MonadIO m) => FontT -> m (Int32, FontExtentsT)
- fontGetNominalGlyph :: (HasCallStack, MonadIO m) => FontT -> Word32 -> m (Int32, Word32)
- fontGetNominalGlyphs :: (HasCallStack, MonadIO m) => FontT -> Word32 -> Word32 -> Word32 -> Word32 -> m (Word32, Word32)
- fontGetParent :: (HasCallStack, MonadIO m) => FontT -> m FontT
- fontGetPpem :: (HasCallStack, MonadIO m) => FontT -> m (Word32, Word32)
- fontGetPtem :: (HasCallStack, MonadIO m) => FontT -> m Float
- fontGetScale :: (HasCallStack, MonadIO m) => FontT -> m (Int32, Int32)
- fontGetSerial :: (HasCallStack, MonadIO m) => FontT -> m Word32
- fontGetSyntheticBold :: (HasCallStack, MonadIO m) => FontT -> m (Float, Float, Int32)
- fontGetSyntheticSlant :: (HasCallStack, MonadIO m) => FontT -> m Float
- fontGetVExtents :: (HasCallStack, MonadIO m) => FontT -> m (Int32, FontExtentsT)
- fontGetVarCoordsDesign :: (HasCallStack, MonadIO m) => FontT -> m (Float, Word32)
- fontGetVarCoordsNormalized :: (HasCallStack, MonadIO m) => FontT -> m (Int32, Word32)
- fontGetVarNamedInstance :: (HasCallStack, MonadIO m) => FontT -> m Word32
- fontGetVariationGlyph :: (HasCallStack, MonadIO m) => FontT -> Word32 -> Word32 -> m (Int32, Word32)
- fontGlyphFromString :: (HasCallStack, MonadIO m) => FontT -> ByteString -> m (Int32, Word32)
- fontGlyphToString :: (HasCallStack, MonadIO m) => FontT -> Word32 -> m [Text]
- fontIsImmutable :: (HasCallStack, MonadIO m) => FontT -> m Int32
- fontIsSynthetic :: (HasCallStack, MonadIO m) => FontT -> m Int32
- fontListFuncs :: (HasCallStack, MonadIO m) => m [Text]
- fontMakeImmutable :: (HasCallStack, MonadIO m) => FontT -> m ()
- fontPaintGlyph :: (HasCallStack, MonadIO m) => FontT -> Word32 -> PaintFuncsT -> Ptr () -> Word32 -> Word32 -> m ()
- fontPaintGlyphOrFail :: (HasCallStack, MonadIO m) => FontT -> Word32 -> PaintFuncsT -> Ptr () -> Word32 -> Word32 -> m Int32
- fontSetFace :: (HasCallStack, MonadIO m) => FontT -> FaceT -> m ()
- fontSetFuncsUsing :: (HasCallStack, MonadIO m) => FontT -> Text -> m Int32
- fontSetParent :: (HasCallStack, MonadIO m) => FontT -> FontT -> m ()
- fontSetPpem :: (HasCallStack, MonadIO m) => FontT -> Word32 -> Word32 -> m ()
- fontSetPtem :: (HasCallStack, MonadIO m) => FontT -> Float -> m ()
- fontSetScale :: (HasCallStack, MonadIO m) => FontT -> Int32 -> Int32 -> m ()
- fontSetSyntheticBold :: (HasCallStack, MonadIO m) => FontT -> Float -> Float -> Int32 -> m ()
- fontSetSyntheticSlant :: (HasCallStack, MonadIO m) => FontT -> Float -> m ()
- fontSetVarCoordsDesign :: (HasCallStack, MonadIO m) => FontT -> [Float] -> m ()
- fontSetVarCoordsNormalized :: (HasCallStack, MonadIO m) => FontT -> [Int32] -> m ()
- fontSetVarNamedInstance :: (HasCallStack, MonadIO m) => FontT -> Word32 -> m ()
- fontSetVariation :: (HasCallStack, MonadIO m) => FontT -> Word32 -> Float -> m ()
- fontSetVariations :: (HasCallStack, MonadIO m) => FontT -> [VariationT] -> m ()
- fontSubtractGlyphOriginForDirection :: (HasCallStack, MonadIO m) => FontT -> Word32 -> DirectionT -> Int32 -> Int32 -> m (Int32, Int32)
- free :: (HasCallStack, MonadIO m) => Ptr () -> m ()
- ftFaceCreateCached :: (HasCallStack, MonadIO m) => Face -> m FaceT
- ftFaceCreateFromBlobOrFail :: (HasCallStack, MonadIO m) => BlobT -> Word32 -> m FaceT
- ftFaceCreateFromFileOrFail :: (HasCallStack, MonadIO m) => Text -> Word32 -> m FaceT
- ftFaceCreateReferenced :: (HasCallStack, MonadIO m) => Face -> m FaceT
- ftFontChanged :: (HasCallStack, MonadIO m) => FontT -> m ()
- ftFontCreateReferenced :: (HasCallStack, MonadIO m) => Face -> m FontT
- ftFontGetLoadFlags :: (HasCallStack, MonadIO m) => FontT -> m Int32
- ftFontSetFuncs :: (HasCallStack, MonadIO m) => FontT -> m ()
- ftFontSetLoadFlags :: (HasCallStack, MonadIO m) => FontT -> Int32 -> m ()
- ftHbFontChanged :: (HasCallStack, MonadIO m) => FontT -> m Int32
- glibBlobCreate :: (HasCallStack, MonadIO m) => Bytes -> m BlobT
- glibGetUnicodeFuncs :: (HasCallStack, MonadIO m) => m UnicodeFuncsT
- glibScriptFromScript :: (HasCallStack, MonadIO m) => ScriptT -> m UnicodeScript
- glibScriptToScript :: (HasCallStack, MonadIO m) => UnicodeScript -> m ScriptT
- glyphInfoGetGlyphFlags :: (HasCallStack, MonadIO m) => GlyphInfoT -> m [GlyphFlagsT]
- languageFromString :: (HasCallStack, MonadIO m) => ByteString -> m LanguageT
- languageGetDefault :: (HasCallStack, MonadIO m) => m LanguageT
- languageMatches :: (HasCallStack, MonadIO m) => LanguageT -> LanguageT -> m Int32
- languageToString :: (HasCallStack, MonadIO m) => LanguageT -> m Text
- malloc :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())
- mapAllocationSuccessful :: (HasCallStack, MonadIO m) => MapT -> m Int32
- mapClear :: (HasCallStack, MonadIO m) => MapT -> m ()
- mapCopy :: (HasCallStack, MonadIO m) => MapT -> m MapT
- mapCreate :: (HasCallStack, MonadIO m) => m MapT
- mapDel :: (HasCallStack, MonadIO m) => MapT -> Word32 -> m ()
- mapGet :: (HasCallStack, MonadIO m) => MapT -> Word32 -> m Word32
- mapGetEmpty :: (HasCallStack, MonadIO m) => m MapT
- mapGetPopulation :: (HasCallStack, MonadIO m) => MapT -> m Word32
- mapHas :: (HasCallStack, MonadIO m) => MapT -> Word32 -> m Int32
- mapHash :: (HasCallStack, MonadIO m) => MapT -> m Word32
- mapIsEmpty :: (HasCallStack, MonadIO m) => MapT -> m Int32
- mapIsEqual :: (HasCallStack, MonadIO m) => MapT -> MapT -> m Int32
- mapKeys :: (HasCallStack, MonadIO m) => MapT -> SetT -> m ()
- mapNext :: (HasCallStack, MonadIO m) => MapT -> Int32 -> m (Int32, Int32, Word32, Word32)
- mapSet :: (HasCallStack, MonadIO m) => MapT -> Word32 -> Word32 -> m ()
- mapUpdate :: (HasCallStack, MonadIO m) => MapT -> MapT -> m ()
- mapValues :: (HasCallStack, MonadIO m) => MapT -> SetT -> m ()
- otColorGlyphGetLayers :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> Maybe [OtColorLayerT] -> m (Word32, Maybe [OtColorLayerT])
- otColorGlyphHasPaint :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> m Int32
- otColorGlyphReferencePng :: (HasCallStack, MonadIO m) => FontT -> Word32 -> m BlobT
- otColorGlyphReferenceSvg :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> m BlobT
- otColorHasLayers :: (HasCallStack, MonadIO m) => FaceT -> m Int32
- otColorHasPaint :: (HasCallStack, MonadIO m) => FaceT -> m Int32
- otColorHasPalettes :: (HasCallStack, MonadIO m) => FaceT -> m Int32
- otColorHasPng :: (HasCallStack, MonadIO m) => FaceT -> m Int32
- otColorHasSvg :: (HasCallStack, MonadIO m) => FaceT -> m Int32
- otColorPaletteColorGetNameId :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> m Word32
- otColorPaletteGetColors :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> m (Word32, Maybe [Word32])
- otColorPaletteGetCount :: (HasCallStack, MonadIO m) => FaceT -> m Word32
- otColorPaletteGetFlags :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> m [OtColorPaletteFlagsT]
- otColorPaletteGetNameId :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> m Word32
- otFontSetFuncs :: (HasCallStack, MonadIO m) => FontT -> m ()
- otLayoutFeatureGetCharacters :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> Word32 -> [Word32] -> m (Word32, [Word32])
- otLayoutFeatureGetLookups :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> Word32 -> m (Word32, [Word32])
- otLayoutFeatureGetNameIds :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> m (Int32, Word32, Word32, Word32, Word32, Word32)
- otLayoutFeatureWithVariationsGetLookups :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> Word32 -> Word32 -> m (Word32, [Word32])
- otLayoutGetAttachPoints :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> m (Word32, [Word32])
- otLayoutGetBaseline :: (HasCallStack, MonadIO m) => FontT -> OtLayoutBaselineTagT -> DirectionT -> Word32 -> Word32 -> m (Int32, Int32)
- otLayoutGetBaseline2 :: (HasCallStack, MonadIO m) => FontT -> OtLayoutBaselineTagT -> DirectionT -> ScriptT -> Maybe LanguageT -> m (Int32, Int32)
- otLayoutGetBaselineWithFallback :: (HasCallStack, MonadIO m) => FontT -> OtLayoutBaselineTagT -> DirectionT -> Word32 -> Word32 -> m Int32
- otLayoutGetBaselineWithFallback2 :: (HasCallStack, MonadIO m) => FontT -> OtLayoutBaselineTagT -> DirectionT -> ScriptT -> Maybe LanguageT -> m Int32
- otLayoutGetFontExtents :: (HasCallStack, MonadIO m) => FontT -> DirectionT -> Word32 -> Word32 -> m (Int32, Maybe FontExtentsT)
- otLayoutGetFontExtents2 :: (HasCallStack, MonadIO m) => FontT -> DirectionT -> ScriptT -> Maybe LanguageT -> m (Int32, Maybe FontExtentsT)
- otLayoutGetGlyphClass :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> m OtLayoutGlyphClassT
- otLayoutGetHorizontalBaselineTagForScript :: (HasCallStack, MonadIO m) => ScriptT -> m OtLayoutBaselineTagT
- otLayoutGetLigatureCarets :: (HasCallStack, MonadIO m) => FontT -> DirectionT -> Word32 -> Word32 -> m (Word32, [Int32])
- otLayoutGetSizeParams :: (HasCallStack, MonadIO m) => FaceT -> m (Int32, Word32, Word32, Word32, Word32, Word32)
- otLayoutHasGlyphClasses :: (HasCallStack, MonadIO m) => FaceT -> m Int32
- otLayoutHasPositioning :: (HasCallStack, MonadIO m) => FaceT -> m Int32
- otLayoutHasSubstitution :: (HasCallStack, MonadIO m) => FaceT -> m Int32
- otLayoutLanguageFindFeature :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> Word32 -> Word32 -> m (Int32, Word32)
- otLayoutLanguageGetFeatureIndexes :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> Word32 -> Word32 -> m (Word32, [Word32])
- otLayoutLanguageGetFeatureTags :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> Word32 -> Word32 -> m (Word32, [Word32])
- otLayoutLanguageGetRequiredFeature :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> Word32 -> m (Int32, Word32, Word32)
- otLayoutLanguageGetRequiredFeatureIndex :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> Word32 -> m (Int32, Word32)
- otLayoutLookupGetGlyphAlternates :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> Word32 -> [Word32] -> m (Word32, [Word32])
- otLayoutLookupGetOpticalBound :: (HasCallStack, MonadIO m) => FontT -> Word32 -> DirectionT -> Word32 -> m Int32
- otLayoutLookupWouldSubstitute :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> Word32 -> Int32 -> m Int32
- otLayoutScriptFindLanguage :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> Word32 -> Word32 -> m Int32
- otLayoutScriptGetLanguageTags :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> Word32 -> m (Word32, [Word32])
- otLayoutScriptSelectLanguage :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> Word32 -> Word32 -> m (Int32, Word32)
- otLayoutScriptSelectLanguage2 :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> Word32 -> Word32 -> m (Int32, Word32, Word32)
- otLayoutTableChooseScript :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> m (Int32, Word32, Word32)
- otLayoutTableFindFeatureVariations :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Int32 -> Word32 -> m (Int32, Word32)
- otLayoutTableFindScript :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> m (Int32, Word32)
- otLayoutTableGetFeatureTags :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> m (Word32, [Word32])
- otLayoutTableGetLookupCount :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> m Word32
- otLayoutTableGetScriptTags :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> m (Word32, [Word32])
- otLayoutTableSelectScript :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> Word32 -> m (Int32, Word32, Word32)
- otMathGetConstant :: (HasCallStack, MonadIO m) => FontT -> OtMathConstantT -> m Int32
- otMathGetGlyphAssembly :: (HasCallStack, MonadIO m) => FontT -> Word32 -> DirectionT -> Word32 -> [OtMathGlyphPartT] -> m (Word32, [OtMathGlyphPartT], Int32)
- otMathGetGlyphItalicsCorrection :: (HasCallStack, MonadIO m) => FontT -> Word32 -> m Int32
- otMathGetGlyphKerning :: (HasCallStack, MonadIO m) => FontT -> Word32 -> OtMathKernT -> Int32 -> m Int32
- otMathGetGlyphKernings :: (HasCallStack, MonadIO m) => FontT -> Word32 -> OtMathKernT -> Word32 -> [OtMathKernEntryT] -> m (Word32, [OtMathKernEntryT])
- otMathGetGlyphTopAccentAttachment :: (HasCallStack, MonadIO m) => FontT -> Word32 -> m Int32
- otMathGetGlyphVariants :: (HasCallStack, MonadIO m) => FontT -> Word32 -> DirectionT -> Word32 -> [OtMathGlyphVariantT] -> m (Word32, [OtMathGlyphVariantT])
- otMathGetMinConnectorOverlap :: (HasCallStack, MonadIO m) => FontT -> DirectionT -> m Int32
- otMathHasData :: (HasCallStack, MonadIO m) => FaceT -> m Int32
- otMathIsGlyphExtendedShape :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> m Int32
- otMetaGetEntryTags :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> [OtMetaTagT] -> m (Word32, [OtMetaTagT])
- otMetaReferenceEntry :: (HasCallStack, MonadIO m) => FaceT -> OtMetaTagT -> m BlobT
- otMetricsGetPosition :: (HasCallStack, MonadIO m) => FontT -> OtMetricsTagT -> m (Int32, Int32)
- otMetricsGetPositionWithFallback :: (HasCallStack, MonadIO m) => FontT -> OtMetricsTagT -> m Int32
- otMetricsGetVariation :: (HasCallStack, MonadIO m) => FontT -> OtMetricsTagT -> m Float
- otMetricsGetXVariation :: (HasCallStack, MonadIO m) => FontT -> OtMetricsTagT -> m Int32
- otMetricsGetYVariation :: (HasCallStack, MonadIO m) => FontT -> OtMetricsTagT -> m Int32
- otNameGetUtf16 :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> LanguageT -> [Word16] -> m (Word32, [Word16])
- otNameGetUtf32 :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> LanguageT -> [Word32] -> m (Word32, [Word32])
- otNameGetUtf8 :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> LanguageT -> [Text] -> m (Word32, [Text])
- otNameListNames :: (HasCallStack, MonadIO m) => FaceT -> m [OtNameEntryT]
- otShapePlanGetFeatureTags :: (HasCallStack, MonadIO m) => ShapePlanT -> Word32 -> m (Word32, [Word32])
- otTagFromLanguage :: (HasCallStack, MonadIO m) => LanguageT -> m Word32
- otTagToLanguage :: (HasCallStack, MonadIO m) => Word32 -> m (Maybe LanguageT)
- otTagToScript :: (HasCallStack, MonadIO m) => Word32 -> m ScriptT
- otTagsFromScript :: (HasCallStack, MonadIO m) => ScriptT -> m (Word32, Word32)
- otTagsFromScriptAndLanguage :: (HasCallStack, MonadIO m) => ScriptT -> Maybe LanguageT -> Word32 -> Word32 -> m (Word32, Word32, Word32, Word32)
- otVarFindAxis :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Word32 -> m (Int32, OtVarAxisT)
- otVarFindAxisInfo :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> m (Int32, OtVarAxisInfoT)
- otVarGetAxes :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> [OtVarAxisT] -> m (Word32, [OtVarAxisT])
- otVarGetAxisCount :: (HasCallStack, MonadIO m) => FaceT -> m Word32
- otVarGetAxisInfos :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> [OtVarAxisInfoT] -> m (Word32, [OtVarAxisInfoT])
- otVarGetNamedInstanceCount :: (HasCallStack, MonadIO m) => FaceT -> m Word32
- otVarHasData :: (HasCallStack, MonadIO m) => FaceT -> m Int32
- otVarNamedInstanceGetDesignCoords :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> m (Word32, [Float])
- otVarNamedInstanceGetPostscriptNameId :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> m Word32
- otVarNamedInstanceGetSubfamilyNameId :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> m Word32
- otVarNormalizeCoords :: (HasCallStack, MonadIO m) => FaceT -> Word32 -> Float -> m Int32
- otVarNormalizeVariations :: (HasCallStack, MonadIO m) => FaceT -> VariationT -> Word32 -> m [Int32]
- paintColor :: (HasCallStack, MonadIO m) => PaintFuncsT -> Ptr () -> Int32 -> Word32 -> m ()
- paintColorGlyph :: (HasCallStack, MonadIO m) => PaintFuncsT -> Ptr () -> Word32 -> FontT -> m Int32
- paintCustomPaletteColor :: (HasCallStack, MonadIO m) => PaintFuncsT -> Ptr () -> Word32 -> m (Int32, Word32)
- paintFuncsCreate :: (HasCallStack, MonadIO m) => m PaintFuncsT
- paintFuncsGetEmpty :: (HasCallStack, MonadIO m) => m PaintFuncsT
- paintFuncsIsImmutable :: (HasCallStack, MonadIO m) => PaintFuncsT -> m Int32
- paintFuncsMakeImmutable :: (HasCallStack, MonadIO m) => PaintFuncsT -> m ()
- paintImage :: (HasCallStack, MonadIO m) => PaintFuncsT -> Ptr () -> BlobT -> Word32 -> Word32 -> Word32 -> Float -> Maybe GlyphExtentsT -> m ()
- paintLinearGradient :: (HasCallStack, MonadIO m) => PaintFuncsT -> Ptr () -> ColorLineT -> Float -> Float -> Float -> Float -> Float -> Float -> m ()
- paintPopClip :: (HasCallStack, MonadIO m) => PaintFuncsT -> Ptr () -> m ()
- paintPopGroup :: (HasCallStack, MonadIO m) => PaintFuncsT -> Ptr () -> PaintCompositeModeT -> m ()
- paintPopTransform :: (HasCallStack, MonadIO m) => PaintFuncsT -> Ptr () -> m ()
- paintPushClipGlyph :: (HasCallStack, MonadIO m) => PaintFuncsT -> Ptr () -> Word32 -> FontT -> m ()
- paintPushClipRectangle :: (HasCallStack, MonadIO m) => PaintFuncsT -> Ptr () -> Float -> Float -> Float -> Float -> m ()
- paintPushFontTransform :: (HasCallStack, MonadIO m) => PaintFuncsT -> Ptr () -> FontT -> m ()
- paintPushGroup :: (HasCallStack, MonadIO m) => PaintFuncsT -> Ptr () -> m ()
- paintPushInverseFontTransform :: (HasCallStack, MonadIO m) => PaintFuncsT -> Ptr () -> FontT -> m ()
- paintPushTransform :: (HasCallStack, MonadIO m) => PaintFuncsT -> Ptr () -> Float -> Float -> Float -> Float -> Float -> Float -> m ()
- paintRadialGradient :: (HasCallStack, MonadIO m) => PaintFuncsT -> Ptr () -> ColorLineT -> Float -> Float -> Float -> Float -> Float -> Float -> m ()
- paintSweepGradient :: (HasCallStack, MonadIO m) => PaintFuncsT -> Ptr () -> ColorLineT -> Float -> Float -> Float -> Float -> m ()
- realloc :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m (Ptr ())
- scriptFromIso15924Tag :: (HasCallStack, MonadIO m) => Word32 -> m ScriptT
- scriptFromString :: (HasCallStack, MonadIO m) => ByteString -> m ScriptT
- scriptGetHorizontalDirection :: (HasCallStack, MonadIO m) => ScriptT -> m DirectionT
- scriptToIso15924Tag :: (HasCallStack, MonadIO m) => ScriptT -> m Word32
- segmentPropertiesEqual :: (HasCallStack, MonadIO m) => SegmentPropertiesT -> SegmentPropertiesT -> m Int32
- segmentPropertiesHash :: (HasCallStack, MonadIO m) => SegmentPropertiesT -> m Word32
- segmentPropertiesOverlay :: (HasCallStack, MonadIO m) => SegmentPropertiesT -> SegmentPropertiesT -> m ()
- setAdd :: (HasCallStack, MonadIO m) => SetT -> Word32 -> m ()
- setAddRange :: (HasCallStack, MonadIO m) => SetT -> Word32 -> Word32 -> m ()
- setAddSortedArray :: (HasCallStack, MonadIO m) => SetT -> [Word32] -> m ()
- setAllocationSuccessful :: (HasCallStack, MonadIO m) => SetT -> m Int32
- setClear :: (HasCallStack, MonadIO m) => SetT -> m ()
- setCopy :: (HasCallStack, MonadIO m) => SetT -> m SetT
- setCreate :: (HasCallStack, MonadIO m) => m SetT
- setDel :: (HasCallStack, MonadIO m) => SetT -> Word32 -> m ()
- setDelRange :: (HasCallStack, MonadIO m) => SetT -> Word32 -> Word32 -> m ()
- setGetEmpty :: (HasCallStack, MonadIO m) => m SetT
- setGetMax :: (HasCallStack, MonadIO m) => SetT -> m Word32
- setGetMin :: (HasCallStack, MonadIO m) => SetT -> m Word32
- setGetPopulation :: (HasCallStack, MonadIO m) => SetT -> m Word32
- setHas :: (HasCallStack, MonadIO m) => SetT -> Word32 -> m Int32
- setHash :: (HasCallStack, MonadIO m) => SetT -> m Word32
- setIntersect :: (HasCallStack, MonadIO m) => SetT -> SetT -> m ()
- setInvert :: (HasCallStack, MonadIO m) => SetT -> m ()
- setIsEmpty :: (HasCallStack, MonadIO m) => SetT -> m Int32
- setIsEqual :: (HasCallStack, MonadIO m) => SetT -> SetT -> m Int32
- setIsInverted :: (HasCallStack, MonadIO m) => SetT -> m Int32
- setIsSubset :: (HasCallStack, MonadIO m) => SetT -> SetT -> m Int32
- setNext :: (HasCallStack, MonadIO m) => SetT -> Word32 -> m (Int32, Word32)
- setNextMany :: (HasCallStack, MonadIO m) => SetT -> Word32 -> [Word32] -> m Word32
- setNextRange :: (HasCallStack, MonadIO m) => SetT -> Word32 -> m (Int32, Word32, Word32)
- setPrevious :: (HasCallStack, MonadIO m) => SetT -> Word32 -> m (Int32, Word32)
- setPreviousRange :: (HasCallStack, MonadIO m) => SetT -> Word32 -> m (Int32, Word32, Word32)
- setSet :: (HasCallStack, MonadIO m) => SetT -> SetT -> m ()
- setSubtract :: (HasCallStack, MonadIO m) => SetT -> SetT -> m ()
- setSymmetricDifference :: (HasCallStack, MonadIO m) => SetT -> SetT -> m ()
- setUnion :: (HasCallStack, MonadIO m) => SetT -> SetT -> m ()
- shape :: (HasCallStack, MonadIO m) => FontT -> BufferT -> Maybe [FeatureT] -> m ()
- shapeFull :: (HasCallStack, MonadIO m) => FontT -> BufferT -> Maybe [FeatureT] -> Maybe [Text] -> m Int32
- shapeListShapers :: (HasCallStack, MonadIO m) => m [Text]
- shapePlanCreate :: (HasCallStack, MonadIO m) => FaceT -> SegmentPropertiesT -> [FeatureT] -> [Text] -> m ShapePlanT
- shapePlanCreate2 :: (HasCallStack, MonadIO m) => FaceT -> SegmentPropertiesT -> [FeatureT] -> [Int32] -> [Text] -> m ShapePlanT
- shapePlanCreateCached :: (HasCallStack, MonadIO m) => FaceT -> SegmentPropertiesT -> [FeatureT] -> [Text] -> m ShapePlanT
- shapePlanCreateCached2 :: (HasCallStack, MonadIO m) => FaceT -> SegmentPropertiesT -> [FeatureT] -> [Int32] -> [Text] -> m ShapePlanT
- shapePlanExecute :: (HasCallStack, MonadIO m) => ShapePlanT -> FontT -> BufferT -> [FeatureT] -> m Int32
- shapePlanGetEmpty :: (HasCallStack, MonadIO m) => m ShapePlanT
- shapePlanGetShaper :: (HasCallStack, MonadIO m) => ShapePlanT -> m Text
- styleGetValue :: (HasCallStack, MonadIO m) => FontT -> StyleTagT -> m Float
- tagFromString :: (HasCallStack, MonadIO m) => ByteString -> m Word32
- unicodeCombiningClass :: (HasCallStack, MonadIO m) => UnicodeFuncsT -> Word32 -> m UnicodeCombiningClassT
- unicodeCompose :: (HasCallStack, MonadIO m) => UnicodeFuncsT -> Word32 -> Word32 -> m (Int32, Word32)
- unicodeDecompose :: (HasCallStack, MonadIO m) => UnicodeFuncsT -> Word32 -> m (Int32, Word32, Word32)
- unicodeDecomposeCompatibility :: (HasCallStack, MonadIO m) => UnicodeFuncsT -> Word32 -> m (Word32, Word32)
- unicodeEastasianWidth :: (HasCallStack, MonadIO m) => UnicodeFuncsT -> Word32 -> m Word32
- unicodeFuncsCreate :: (HasCallStack, MonadIO m) => Maybe UnicodeFuncsT -> m UnicodeFuncsT
- unicodeFuncsGetDefault :: (HasCallStack, MonadIO m) => m UnicodeFuncsT
- unicodeFuncsGetEmpty :: (HasCallStack, MonadIO m) => m UnicodeFuncsT
- unicodeFuncsGetParent :: (HasCallStack, MonadIO m) => UnicodeFuncsT -> m UnicodeFuncsT
- unicodeFuncsIsImmutable :: (HasCallStack, MonadIO m) => UnicodeFuncsT -> m Int32
- unicodeFuncsMakeImmutable :: (HasCallStack, MonadIO m) => UnicodeFuncsT -> m ()
- unicodeGeneralCategory :: (HasCallStack, MonadIO m) => UnicodeFuncsT -> Word32 -> m UnicodeGeneralCategoryT
- unicodeMirroring :: (HasCallStack, MonadIO m) => UnicodeFuncsT -> Word32 -> m Word32
- unicodeScript :: (HasCallStack, MonadIO m) => UnicodeFuncsT -> Word32 -> m ScriptT
- variationFromString :: (HasCallStack, MonadIO m) => ByteString -> m (Int32, VariationT)
- variationToString :: (HasCallStack, MonadIO m) => VariationT -> [Text] -> m [Text]

# Methods

## aatLayoutFeatureTypeGetNameId

aatLayoutFeatureTypeGetNameId Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> AatLayoutFeatureTypeT | `featureType`: The `AatLayoutFeatureTypeT` of the requested feature type
-> m Word32 | Returns: Name identifier of the requested feature type

Fetches the name identifier of the specified feature type in the face's `name` table.

Since: 2.2.0

## aatLayoutFeatureTypeGetSelectorInfos

aatLayoutFeatureTypeGetSelectorInfos Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> AatLayoutFeatureTypeT | `featureType`: The `AatLayoutFeatureTypeT` of the requested feature type
-> Word32 | `startOffset`: offset of the first feature type to retrieve
-> [AatLayoutFeatureSelectorInfoT] | `selectors`: A buffer pointer. The selectors available for the feature type queries.
-> m (Word32, [AatLayoutFeatureSelectorInfoT], Word32) | Returns: Number of all available feature selectors

Fetches a list of the selectors available for the specified feature in the given face.

If upon return, `defaultIndex` is set to `AAT_LAYOUT_NO_SELECTOR_INDEX`, then the feature type is non-exclusive. Otherwise, `defaultIndex` is the index of the selector that is selected by default.

Since: 2.2.0

## aatLayoutGetFeatureTypes

aatLayoutGetFeatureTypes Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `startOffset`: offset of the first feature type to retrieve
-> [AatLayoutFeatureTypeT] | `features`: Array of feature types found
-> m (Word32, [AatLayoutFeatureTypeT]) | Returns: Number of all available feature types.

Fetches a list of the AAT feature types included in the specified face.

Since: 2.2.0

## aatLayoutHasPositioning

aatLayoutHasPositioning Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> m Int32 | Returns: `true` if data found, `false` otherwise

Tests whether the specified face includes any positioning information in the `kerx` table.

<note>Note: does not examine the `GPOS` table.</note>

Since: 2.3.0

## aatLayoutHasSubstitution

aatLayoutHasSubstitution Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> m Int32 | Returns: `true` if data found, `false` otherwise

Tests whether the specified face includes any substitutions in the `morx` or `mort` tables.

<note>Note: does not examine the `GSUB` table.</note>

Since: 2.3.0

## aatLayoutHasTracking

aatLayoutHasTracking Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> m Int32 | Returns: `true` if data found, `false` otherwise

Tests whether the specified face includes any tracking information in the `trak` table.

Since: 2.3.0

## blobCopyWritableOrFail

blobCopyWritableOrFail Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BlobT | `blob`: A blob.
-> m BlobT | Returns: The new blob, or nullptr if allocation failed

Makes a writable copy of `blob`.

Since: 1.8.0

## blobCreateFromFile

blobCreateFromFile Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `fileName`: A font filename
-> m BlobT | Returns: An `BlobT` pointer with the content of the file, or `blobGetEmpty` if failed.

Creates a new blob containing the data from the specified binary font file.

The filename is passed directly to the system on all platforms, except on Windows, where the filename is interpreted as UTF-8. Only if the filename is not valid UTF-8, it will be interpreted according to the system codepage.

Since: 1.7.7

## blobCreateFromFileOrFail

blobCreateFromFileOrFail Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `fileName`: A filename
-> m BlobT | Returns: An `BlobT` pointer with the content of the file, or `NULL` if failed.

Creates a new blob containing the data from the specified file.

The filename is passed directly to the system on all platforms, except on Windows, where the filename is interpreted as UTF-8. Only if the filename is not valid UTF-8, it will be interpreted according to the system codepage.

Since: 2.8.2

## blobCreateSubBlob

blobCreateSubBlob Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BlobT | `parent`: Parent blob.
-> Word32 | `offset`: Start offset of sub-blob within `parent`, in bytes.
-> Word32 | `length`: Length of sub-blob.
-> m BlobT | Returns: New blob, or the empty blob if something failed or if `length` is zero or `offset` is beyond the end of `parent`'s data. Destroy with `hb_blob_destroy()`.

Returns a blob that represents a range of bytes in `parent`. The new blob is always created with `HB_MEMORY_MODE_READONLY`, meaning that it will never modify data in the parent blob. The parent data is not expected to be modified, and will result in undefined behavior if it is.

Makes `parent` immutable.

Since: 0.9.2

## blobGetData

blobGetData Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BlobT | `blob`: a blob.
-> m (Maybe [Text]) | Returns: the byte data of `blob`.

Fetches the data from a blob.

Since: 0.9.2

## blobGetDataWritable

blobGetDataWritable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BlobT | `blob`: a blob.
-> m [Text] | Returns: Writable blob data, or `NULL` if failed.

Tries to make blob data writable (possibly copying it) and return pointer to data.

Fails if blob has been made immutable, or if memory allocation fails.

Since: 0.9.2

## blobGetEmpty

blobGetEmpty Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m BlobT | Returns: The empty blob.

Returns the singleton empty blob.

See TODO:link object types for more information.

Since: 0.9.2

## blobGetLength

blobGetLength Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BlobT | `blob`: a blob.
-> m Word32 | Returns: the length of `blob` data in bytes.

Fetches the length of a blob's data.

Since: 0.9.2

## blobIsImmutable

blobIsImmutable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BlobT | `blob`: a blob.
-> m Int32 | Returns: `true` if `blob` is immutable, `false` otherwise

Tests whether a blob is immutable.

Since: 0.9.2

## blobMakeImmutable

blobMakeImmutable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BlobT | `blob`: a blob
-> m () |

Makes a blob immutable.

Since: 0.9.2

## bufferAdd

bufferAdd Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> Word32 | `codepoint`: A Unicode code point.
-> Word32 | `cluster`: The cluster value of `codepoint`.
-> m () |

Appends a character with the Unicode value of `codepoint` to `buffer`, and gives it the initial cluster value of `cluster`. Clusters can be any thing the client wants, they are usually used to refer to the index of the character in the input text stream and are output in `GlyphInfoT`.`cluster` field.

This function does not check the validity of `codepoint`, it is up to the caller to ensure it is a valid Unicode code point.

Since: 0.9.7

## bufferAddCodepoints

bufferAddCodepoints Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: a `BufferT` to append characters to.
-> [Word32] | `text`: an array of Unicode code points to append.
-> Word32 | `itemOffset`: the offset of the first code point to add to the `buffer`.
-> Int32 | `itemLength`: the number of code points to add to the `buffer`, or -1 for the end of `text` (assuming it is `NULL` terminated).
-> m () |

Appends characters from `text` array to `buffer`. The `itemOffset` is the position of the first character from `text` that will be appended, and `itemLength` is the number of character. When shaping part of a larger text (e.g. a run of text from a paragraph), instead of passing just the substring corresponding to the run, it is preferable to pass the whole paragraph and specify the run start and length as `itemOffset` and `itemLength`, respectively, to give HarfBuzz the full context to be able, for example, to do cross-run Arabic shaping or properly handle combining marks at stat of run.

This function does not check the validity of `text`, it is up to the caller to ensure it contains a valid Unicode scalar values. In contrast, `bufferAddUtf32` can be used that takes similar input but performs sanity-check on the input.

Since: 0.9.31

## bufferAddLatin1

bufferAddLatin1 Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> ByteString | `text`: an array of UTF-8 characters to append
-> Word32 | `itemOffset`: the offset of the first character to add to the `buffer`
-> Int32 | `itemLength`: the number of characters to add to the `buffer`, or -1 for the end of `text` (assuming it is `NULL` terminated)
-> m () |

Similar to `bufferAddCodepoints`, but allows only access to first 256 Unicode code points that can fit in 8-bit strings.

<note>Has nothing to do with non-Unicode Latin-1 encoding.</note>

Since: 0.9.39

## bufferAddUtf16

bufferAddUtf16 Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> [Word16] | `text`: An array of UTF-16 characters to append
-> Word32 | `itemOffset`: The offset of the first character to add to the `buffer`
-> Int32 | `itemLength`: The number of characters to add to the `buffer`, or -1 for the end of `text` (assuming it is `NULL` terminated)
-> m () |

See `bufferAddCodepoints`.

Replaces invalid UTF-16 characters with the `buffer` replacement code point, see `bufferSetReplacementCodepoint`.

Since: 0.9.2

## bufferAddUtf32

bufferAddUtf32 Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> [Word32] | `text`: An array of UTF-32 characters to append
-> Word32 | `itemOffset`: The offset of the first character to add to the `buffer`
-> Int32 | `itemLength`: The number of characters to add to the `buffer`, or -1 for the end of `text` (assuming it is `NULL` terminated)
-> m () |

See `bufferAddCodepoints`.

Replaces invalid UTF-32 characters with the `buffer` replacement code point, see `bufferSetReplacementCodepoint`.

Since: 0.9.2

## bufferAddUtf8

bufferAddUtf8 Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> ByteString | `text`: An array of UTF-8 characters to append.
-> Word32 | `itemOffset`: The offset of the first character to add to the `buffer`.
-> Int32 | `itemLength`: The number of characters to add to the `buffer`, or -1 for the end of `text` (assuming it is `NULL` terminated).
-> m () |

See `bufferAddCodepoints`.

Replaces invalid UTF-8 characters with the `buffer` replacement code point, see `bufferSetReplacementCodepoint`.

Since: 0.9.2

## bufferAllocationSuccessful

bufferAllocationSuccessful Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m Int32 | Returns: `true` if `buffer` memory allocation succeeded, `false` otherwise.

Check if allocating memory for the buffer succeeded.

Since: 0.9.2

## bufferAppend

bufferAppend Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> BufferT | `source`: source `BufferT`
-> Word32 | `start`: start index into source buffer to copy. Use 0 to copy from start of buffer.
-> Word32 | `end`: end index into source buffer to copy. Use `uINTMAX` (or ((unsigned int) -1)) to copy to end of buffer.
-> m () |

Append (part of) contents of another buffer to this buffer.

Since: 1.5.0

## bufferClearContents

bufferClearContents Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m () |

Similar to `bufferReset`, but does not clear the Unicode functions and the replacement code point.

Since: 0.9.11

## bufferCreate

bufferCreate Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m BufferT | Returns: A newly allocated `BufferT` with a reference count of 1. The initial reference count should be released with `hb_buffer_destroy()` when you are done using the `BufferT`. This function never returns `NULL`. If memory cannot be allocated, a special `BufferT` object will be returned on which `bufferAllocationSuccessful` returns `false`.

Creates a new `BufferT` with all properties to defaults.

Since: 0.9.2

## bufferCreateSimilar

bufferCreateSimilar Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `src`: An `BufferT`
-> m BufferT | Returns: A newly allocated `BufferT`, similar to `bufferCreate`.

Creates a new `BufferT`, similar to `bufferCreate`. The only difference is that the buffer is configured similarly to `src`.

Since: 3.3.0

## bufferDeserializeGlyphs

bufferDeserializeGlyphs Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: an `BufferT` buffer.
-> [Text] | `buf`: string to deserialize
-> Maybe FontT | `font`: font for getting glyph IDs
-> BufferSerializeFormatT | `format`: the `BufferSerializeFormatT` of the input `buf`
-> m (Int32, Text) | Returns: `true` if the full string was parsed, `false` otherwise.

Deserializes glyphs `buffer` from textual representation in the format produced by `bufferSerializeGlyphs`.

Since: 0.9.7

## bufferDeserializeUnicode

bufferDeserializeUnicode Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: an `BufferT` buffer.
-> [Text] | `buf`: string to deserialize
-> BufferSerializeFormatT | `format`: the `BufferSerializeFormatT` of the input `buf`
-> m (Int32, Text) | Returns: `true` if the full string was parsed, `false` otherwise.

Deserializes Unicode `buffer` from textual representation in the format produced by `bufferSerializeUnicode`.

Since: 2.7.3

## bufferDiff

bufferDiff Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: a buffer.
-> BufferT | `reference`: other buffer to compare to.
-> Word32 | `dottedcircleGlyph`: glyph id of U+25CC DOTTED CIRCLE, or (hb_codepoint_t) -1.
-> Word32 | `positionFuzz`: allowed absolute difference in position values.
-> m [BufferDiffFlagsT] |

If dottedcircle_glyph is (hb_codepoint_t) -1 then `HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT` and `HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT` are never returned. This should be used by most callers if just comparing two buffers is needed.

Since: 1.5.0

## bufferGetClusterLevel

bufferGetClusterLevel Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m BufferClusterLevelT | Returns: The cluster level of `buffer`

Fetches the cluster level of a buffer. The `BufferClusterLevelT` dictates one aspect of how HarfBuzz will treat non-base characters during shaping.

Since: 0.9.42

## bufferGetContentType

bufferGetContentType Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m BufferContentTypeT | Returns: The type of `buffer` contents

Fetches the type of `buffer` contents. Buffers are either empty, contain characters (before shaping), or contain glyphs (the result of shaping).

Since: 0.9.5

## bufferGetDirection

bufferGetDirection Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m DirectionT | Returns: The direction of the `buffer`.

See `bufferSetDirection`

Since: 0.9.2

## bufferGetEmpty

bufferGetEmpty Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m BufferT | Returns: The empty buffer

Fetches an empty `BufferT`.

Since: 0.9.2

## bufferGetFlags

bufferGetFlags Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m [BufferFlagsT] | Returns: The `buffer` flags

Fetches the `BufferFlagsT` of `buffer`.

Since: 0.9.7

## bufferGetGlyphInfos

bufferGetGlyphInfos Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m [GlyphInfoT] | Returns: The `buffer` glyph information array. The value valid as long as buffer has not been modified.

Returns `buffer` glyph information array. Returned pointer is valid as long as `buffer` contents are not modified.

Since: 0.9.2

## bufferGetGlyphPositions

bufferGetGlyphPositions Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m [GlyphPositionT] | Returns: The `buffer` glyph position array. The value valid as long as buffer has not been modified.

Returns `buffer` glyph position array. Returned pointer is valid as long as `buffer` contents are not modified.

If buffer did not have positions before, the positions will be initialized to zeros, unless this function is called from within a buffer message callback (see `bufferSetMessageFunc`), in which case `NULL` is returned.

Since: 0.9.2

## bufferGetInvisibleGlyph

bufferGetInvisibleGlyph Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m Word32 | Returns: The `buffer` invisible `hb_codepoint_t`

See `bufferSetInvisibleGlyph`.

Since: 2.0.0

## bufferGetLanguage

bufferGetLanguage Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m LanguageT | Returns: The `LanguageT` of the buffer. Must not be freed by the caller.

See `bufferSetLanguage`.

Since: 0.9.2

## bufferGetLength

bufferGetLength Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m Word32 | Returns: The `buffer` length. The value valid as long as buffer has not been modified.

Returns the number of items in the buffer.

Since: 0.9.2

## bufferGetNotFoundGlyph

bufferGetNotFoundGlyph Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m Word32 | Returns: The `buffer` not-found `hb_codepoint_t`

See `bufferSetNotFoundGlyph`.

Since: 3.1.0

## bufferGetNotFoundVariationSelectorGlyph

bufferGetNotFoundVariationSelectorGlyph Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m Word32 | Returns: The `buffer` not-found-variation-selector `hb_codepoint_t`

See `bufferSetNotFoundVariationSelectorGlyph`.

Since: 10.0.0

## bufferGetRandomState

bufferGetRandomState Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m Word32 | Returns: The `buffer` random state

See `bufferSetRandomState`.

Since: 8.4.0

## bufferGetReplacementCodepoint

bufferGetReplacementCodepoint Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m Word32 | Returns: The `buffer` replacement `hb_codepoint_t`

Fetches the `hb_codepoint_t` that replaces invalid entries for a given encoding when adding text to `buffer`.

Since: 0.9.31

## bufferGetScript

bufferGetScript Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m ScriptT | Returns: The `ScriptT` of the `buffer`

Fetches the script of `buffer`.

Since: 0.9.2

## bufferGetSegmentProperties

bufferGetSegmentProperties Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m SegmentPropertiesT |

Sets `props` to the `SegmentPropertiesT` of `buffer`.

Since: 0.9.7

## bufferGetUnicodeFuncs

bufferGetUnicodeFuncs Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m UnicodeFuncsT | Returns: The Unicode-functions structure

Fetches the Unicode-functions structure of a buffer.

Since: 0.9.2

## bufferGuessSegmentProperties

bufferGuessSegmentProperties Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m () |

Sets unset buffer segment properties based on buffer Unicode contents. If buffer is not empty, it must have content type `HB_BUFFER_CONTENT_TYPE_UNICODE`.

If buffer script is not set (ie. is `HB_SCRIPT_INVALID`), it will be set to the Unicode script of the first character in the buffer that has a script other than `HB_SCRIPT_COMMON`, `HB_SCRIPT_INHERITED`, and `HB_SCRIPT_UNKNOWN`.

Next, if buffer direction is not set (ie. is `HB_DIRECTION_INVALID`), it will be set to the natural horizontal direction of the buffer script as returned by `scriptGetHorizontalDirection`. If `scriptGetHorizontalDirection` returns `HB_DIRECTION_INVALID`, then `HB_DIRECTION_LTR` is used.

Finally, if buffer language is not set (ie. is `LANGUAGE_INVALID`), it will be set to the process's default language as returned by `languageGetDefault`. This may change in the future by taking buffer script into consideration when choosing a language. Note that `languageGetDefault` is NOT threadsafe the first time it is called. See documentation for that function for details.

Since: 0.9.7

## bufferHasPositions

bufferHasPositions Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: an `BufferT`.
-> m Int32 | Returns: `true` if the `buffer` has position array, `false` otherwise.

Returns whether `buffer` has glyph position data. A buffer gains position data when `bufferGetGlyphPositions` is called on it, and cleared of position data when `bufferClearContents` is called.

Since: 2.7.3

## bufferNormalizeGlyphs

bufferNormalizeGlyphs Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m () |

Reorders a glyph buffer to have canonical in-cluster glyph order / position. The resulting clusters should behave identical to pre-reordering clusters.

<note>This has nothing to do with Unicode normalization.</note>

Since: 0.9.2

## bufferPreAllocate

bufferPreAllocate Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> Word32 | `size`: Number of items to pre allocate.
-> m Int32 | Returns: `true` if `buffer` memory allocation succeeded, `false` otherwise

Pre allocates memory for `buffer` to fit at least `size` number of items.

Since: 0.9.2

## bufferReset

bufferReset Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m () |

Resets the buffer to its initial status, as if it was just newly created with `bufferCreate`.

Since: 0.9.2

## bufferReverse

bufferReverse Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m () |

Reverses buffer contents.

Since: 0.9.2

## bufferReverseClusters

bufferReverseClusters Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> m () |

Reverses buffer clusters. That is, the buffer contents are reversed, then each cluster (consecutive items having the same cluster number) are reversed again.

Since: 0.9.2

## bufferReverseRange

bufferReverseRange Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> Word32 | `start`: start index
-> Word32 | `end`: end index
-> m () |

Reverses buffer contents between `start` and `end`.

Since: 0.9.41

## bufferSerialize

bufferSerialize Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: an `BufferT` buffer.
-> Word32 | `start`: the first item in `buffer` to serialize.
-> Word32 | `end`: the last item in `buffer` to serialize.
-> Maybe FontT | `font`: the `FontT` used to shape this buffer, needed to read glyph names and extents. If `NULL`, an empty font will be used.
-> BufferSerializeFormatT | `format`: the `BufferSerializeFormatT` to use for formatting the output.
-> [BufferSerializeFlagsT] | `flags`: the `BufferSerializeFlagsT` that control what glyph properties to serialize.
-> m (Word32, ByteString, Word32) | Returns: The number of serialized items.

Serializes `buffer` into a textual representation of its content, whether Unicode codepoints or glyph identifiers and positioning information. This is useful for showing the contents of the buffer, for example during debugging. See the documentation of `bufferSerializeUnicode` and `bufferSerializeGlyphs` for a description of the output format.

Since: 2.7.3

## bufferSerializeFormatFromString

bufferSerializeFormatFromString Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ByteString | `str`: a string to parse
-> m BufferSerializeFormatT | Returns: The parsed `BufferSerializeFormatT`.

Parses a string into an `BufferSerializeFormatT`. Does not check if `str` is a valid buffer serialization format, use `bufferSerializeListFormats` to get the list of supported formats.

Since: 0.9.7

## bufferSerializeFormatToString

bufferSerializeFormatToString Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferSerializeFormatT | `format`: an `BufferSerializeFormatT` to convert.
-> m Text | Returns: A `NULL` terminated string corresponding to `format`. Should not be freed.

Converts `format` to the string corresponding it, or `NULL` if it is not a valid `BufferSerializeFormatT`.

Since: 0.9.7

## bufferSerializeGlyphs

bufferSerializeGlyphs Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: an `BufferT` buffer.
-> Word32 | `start`: the first item in `buffer` to serialize.
-> Word32 | `end`: the last item in `buffer` to serialize.
-> Maybe FontT | `font`: the `FontT` used to shape this buffer, needed to read glyph names and extents. If `NULL`, an empty font will be used.
-> BufferSerializeFormatT | `format`: the `BufferSerializeFormatT` to use for formatting the output.
-> [BufferSerializeFlagsT] | `flags`: the `BufferSerializeFlagsT` that control what glyph properties to serialize.
-> m (Word32, ByteString, Word32) | Returns: The number of serialized items.

Serializes `buffer` into a textual representation of its glyph content, useful for showing the contents of the buffer, for example during debugging. There are currently two supported serialization formats:

## text

A human-readable, plain text format. The serialized glyphs will look something like:

    [uni0651=0@518,0+0|uni0628=0+1897]

- The serialized glyphs are delimited with `[` and `]`.
- Glyphs are separated with `|`
- Each glyph starts with glyph name, or glyph index if `HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES` flag is set. Then,
- If `HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS` is not set, `=` then `GlyphInfoT`.`cluster`.
- If `HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS` is not set, the `GlyphPositionT` in the format:
- If `GlyphPositionT`.`x_offset` and `GlyphPositionT`.`y_offset` are not both 0, `@x_offset,y_offset`. Then,
- `+x_advance`, then `,y_advance` if `GlyphPositionT`.`y_advance` is not 0. Then,
- If `HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS` is set, the `GlyphExtentsT` in the format `<x_bearing,y_bearing,width,height>`

## json

A machine-readable, structured format. The serialized glyphs will look something like:

    [{"g":"uni0651","cl":0,"dx":518,"dy":0,"ax":0,"ay":0},
    {"g":"uni0628","cl":0,"dx":0,"dy":0,"ax":1897,"ay":0}]

Each glyph is a JSON object, with the following properties: * `g`: the glyph name or glyph index if `HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES` flag is set. * `cl`: `GlyphInfoT`.`cluster` if `HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS` is not set. * `dx`,`dy`,`ax`,`ay`: `GlyphPositionT`.`x_offset`, `GlyphPositionT`.`y_offset`, `GlyphPositionT`.`x_advance` and `GlyphPositionT`.`y_advance` respectively, if `HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS` is not set. * `xb`,`yb`,`w`,`h`: `GlyphExtentsT`.`x_bearing`, `GlyphExtentsT`.`y_bearing`, `GlyphExtentsT`.`width` and `GlyphExtentsT`.`height` respectively if `HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS` is set.

Since: 0.9.7

## bufferSerializeListFormats

bufferSerializeListFormats Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m [Text] | Returns: A string array of buffer serialization formats. Should not be freed.

Returns a list of supported buffer serialization formats.

Since: 0.9.7

## bufferSerializeUnicode

bufferSerializeUnicode Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: an `BufferT` buffer.
-> Word32 | `start`: the first item in `buffer` to serialize.
-> Word32 | `end`: the last item in `buffer` to serialize.
-> BufferSerializeFormatT | `format`: the `BufferSerializeFormatT` to use for formatting the output.
-> [BufferSerializeFlagsT] | `flags`: the `BufferSerializeFlagsT` that control what glyph properties to serialize.
-> m (Word32, ByteString, Word32) | Returns: The number of serialized items.

Serializes `buffer` into a textual representation of its content, when the buffer contains Unicode codepoints (i.e., before shaping). This is useful for showing the contents of the buffer, for example during debugging. There are currently two supported serialization formats:

## text

A human-readable, plain text format. The serialized codepoints will look something like:

     <U+0651=0|U+0628=1>

- Glyphs are separated with `|`
- Unicode codepoints are expressed as zero-padded four (or more) digit hexadecimal numbers preceded by `U+`
- If `HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS` is not set, the cluster will be indicated with a `=` then `GlyphInfoT`.`cluster`.

## json

A machine-readable, structured format. The serialized codepoints will be a list of objects with the following properties: * `u`: the Unicode codepoint as a decimal integer * `cl`: `GlyphInfoT`.`cluster` if `HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS` is not set.

For example:

    [{u:1617,cl:0},{u:1576,cl:1}]

Since: 2.7.3

## bufferSetClusterLevel

bufferSetClusterLevel Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> BufferClusterLevelT | `clusterLevel`: The cluster level to set on the buffer
-> m () |

Sets the cluster level of a buffer. The `BufferClusterLevelT` dictates one aspect of how HarfBuzz will treat non-base characters during shaping.

Since: 0.9.42

## bufferSetContentType

bufferSetContentType Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> BufferContentTypeT | `contentType`: The type of buffer contents to set
-> m () |

Sets the type of `buffer` contents. Buffers are either empty, contain characters (before shaping), or contain glyphs (the result of shaping).

You rarely need to call this function, since a number of other functions transition the content type for you. Namely:

- A newly created buffer starts with content type `BufferContentTypeTInvalid`. Calling `bufferReset`, `bufferClearContents`, as well as calling `bufferSetLength` with an argument of zero all set the buffer content type to invalid as well.
- Calling `bufferAddUtf8`, `bufferAddUtf16`, `bufferAddUtf32`, `bufferAddCodepoints` and `bufferAddLatin1` expect that buffer is either empty and have a content type of invalid, or that buffer content type is `BufferContentTypeTUnicode`, and they also set the content type to Unicode if they added anything to an empty buffer.
- Finally `shape` and `shapeFull` expect that the buffer is either empty and have content type of invalid, or that buffer content type is `BufferContentTypeTUnicode`, and upon success they set the buffer content type to `BufferContentTypeTGlyphs`.

The above transitions are designed such that one can use a buffer in a loop of "reset : add-text : shape" without needing to ever modify the content type manually.

Since: 0.9.5

## bufferSetDirection

bufferSetDirection Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> DirectionT | `direction`: the `DirectionT` of the `buffer`
-> m () |

Set the text flow direction of the buffer. No shaping can happen without setting `buffer` direction, and it controls the visual direction for the output glyphs; for RTL direction the glyphs will be reversed. Many layout features depend on the proper setting of the direction, for example, reversing RTL text before shaping, then shaping with LTR direction is not the same as keeping the text in logical order and shaping with RTL direction.

Since: 0.9.2

## bufferSetFlags

bufferSetFlags Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> [BufferFlagsT] | `flags`: The buffer flags to set
-> m () |

Sets `buffer` flags to `flags`. See `BufferFlagsT`.

Since: 0.9.7

## bufferSetInvisibleGlyph

bufferSetInvisibleGlyph Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> Word32 | `invisible`: the invisible `hb_codepoint_t`
-> m () |

Sets the `hb_codepoint_t` that replaces invisible characters in the shaping result. If set to zero (default), the glyph for the U+0020 SPACE character is used. Otherwise, this value is used verbatim.

Since: 2.0.0

## bufferSetLanguage

bufferSetLanguage Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> LanguageT | `language`: An hb_language_t to set
-> m () |

Sets the language of `buffer` to `language`.

Languages are crucial for selecting which OpenType feature to apply to the buffer which can result in applying language-specific behaviour. Languages are orthogonal to the scripts, and though they are related, they are different concepts and should not be confused with each other.

Use `languageFromString` to convert from BCP 47 language tags to `LanguageT`.

Since: 0.9.2

## bufferSetLength

bufferSetLength Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> Word32 | `length`: The new length of `buffer`
-> m Int32 | Returns: `true` if `buffer` memory allocation succeeded, `false` otherwise.

Similar to `bufferPreAllocate`, but clears any new items added at the end.

Since: 0.9.2

## bufferSetNotFoundGlyph

bufferSetNotFoundGlyph Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> Word32 | `notFound`: the not-found `hb_codepoint_t`
-> m () |

Sets the `hb_codepoint_t` that replaces characters not found in the font during shaping.

The not-found glyph defaults to zero, sometimes known as the ".notdef" glyph. This API allows for differentiating the two.

Since: 3.1.0

## bufferSetNotFoundVariationSelectorGlyph

bufferSetNotFoundVariationSelectorGlyph Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> Word32 | `notFoundVariationSelector`: the not-found-variation-selector `hb_codepoint_t`
-> m () |

Sets the `hb_codepoint_t` that replaces variation-selector characters not resolved in the font during shaping.

The not-found-variation-selector glyph defaults to `CODEPOINT_INVALID`, in which case an unresolved variation-selector will be removed from the glyph string during shaping. This API allows for changing that and retaining a glyph, such that the situation can be detected by the client and handled accordingly (e.g. by using a different font).

Since: 10.0.0

## bufferSetRandomState

bufferSetRandomState Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> Word32 | `state`: the new random state
-> m () |

Sets the random state of the buffer. The state changes every time a glyph uses randomness (eg. the `rand` OpenType feature). This function together with `bufferGetRandomState` allow for transferring the current random state to a subsequent buffer, to get better randomness distribution.

Defaults to 1 and when buffer contents are cleared. A value of 0 disables randomness during shaping.

Since: 8.4.0

## bufferSetReplacementCodepoint

bufferSetReplacementCodepoint Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> Word32 | `replacement`: the replacement `hb_codepoint_t`
-> m () |

Sets the `hb_codepoint_t` that replaces invalid entries for a given encoding when adding text to `buffer`.

Default is `BUFFER_REPLACEMENT_CODEPOINT_DEFAULT`.

Since: 0.9.31

## bufferSetScript

bufferSetScript Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> ScriptT | `script`: An `ScriptT` to set.
-> m () |

Sets the script of `buffer` to `script`.

Script is crucial for choosing the proper shaping behaviour for scripts that require it (e.g. Arabic) and the which OpenType features defined in the font to be applied.

You can pass one of the predefined `ScriptT` values, or use `scriptFromString` or `scriptFromIso15924Tag` to get the corresponding script from an ISO 15924 script tag.

Since: 0.9.2

## bufferSetSegmentProperties

bufferSetSegmentProperties Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> SegmentPropertiesT | `props`: An `SegmentPropertiesT` to use
-> m () |

Sets the segment properties of the buffer, a shortcut for calling `bufferSetDirection`, `bufferSetScript` and `bufferSetLanguage` individually.

Since: 0.9.7

## bufferSetUnicodeFuncs

bufferSetUnicodeFuncs Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BufferT | `buffer`: An `BufferT`
-> UnicodeFuncsT | `unicodeFuncs`: The Unicode-functions structure
-> m () |

Sets the Unicode-functions structure of a buffer to `unicodeFuncs`.

Since: 0.9.2

## calloc

calloc Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> CSize | `nmemb`: The number of elements to allocate.
-> CSize | `size`: The size of each element.
-> m (Ptr ()) | Returns: A pointer to the allocated memory.

Allocates `nmemb` elements of `size` bytes each, initialized to zero, using the allocator set at compile-time. Typically just `calloc()`.

Since: 11.0.0

## colorGetAlpha

colorGetAlpha Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Word32 | `color`: an `hb_color_t` we are interested in its channels.
-> m Word8 | Returns: Alpha channel value

Fetches the alpha channel of the given `color`.

Since: 2.1.0

## colorGetBlue

colorGetBlue Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Word32 | `color`: an `hb_color_t` we are interested in its channels.
-> m Word8 | Returns: Blue channel value

Fetches the blue channel of the given `color`.

Since: 2.1.0

## colorGetGreen

colorGetGreen Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Word32 | `color`: an `hb_color_t` we are interested in its channels.
-> m Word8 | Returns: Green channel value

Fetches the green channel of the given `color`.

Since: 2.1.0

## colorGetRed

colorGetRed Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Word32 | `color`: an `hb_color_t` we are interested in its channels.
-> m Word8 | Returns: Red channel value

Fetches the red channel of the given `color`.

Since: 2.1.0

## colorLineGetColorStops

colorLineGetColorStops Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ColorLineT | `colorLine`: a `ColorLineT` object
-> Word32 | `start`: the index of the first color stop to return
-> [ColorStopT] | `colorStops`: Array of `ColorStopT` to populate
-> m (Word32, [ColorStopT]) | Returns: the total number of color stops in `colorLine`

Fetches a list of color stops from the given color line object.

Note that due to variations being applied, the returned color stops may be out of order. It is the callers responsibility to ensure that color stops are sorted by their offset before they are used.

Since: 7.0.0

## colorLineGetExtend

colorLineGetExtend Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ColorLineT | `colorLine`: a `ColorLineT` object
-> m PaintExtendT | Returns: the extend mode of `colorLine`

Fetches the extend mode of the color line object.

Since: 7.0.0

## directionFromString

directionFromString Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ByteString | `str`: String to convert
-> m DirectionT | Returns: The `DirectionT` matching `str`

Converts a string to an `DirectionT`.

Matching is loose and applies only to the first letter. For examples, "LTR" and "left-to-right" will both return `HB_DIRECTION_LTR`.

Unmatched strings will return `HB_DIRECTION_INVALID`.

Since: 0.9.2

## directionToString

directionToString Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> DirectionT | `direction`: The `DirectionT` to convert
-> m Text | Returns: The string corresponding to `direction`

Converts an `DirectionT` to a string.

Since: 0.9.2

## drawClosePath

drawClosePath Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> DrawFuncsT | `dfuncs`: draw functions
-> Ptr () | `drawData`: associated draw data passed by the caller
-> DrawStateT | `st`: current draw state
-> m () |

Perform a "close-path" draw operation.

Since: 4.0.0

## drawCubicTo

drawCubicTo Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> DrawFuncsT | `dfuncs`: draw functions
-> Ptr () | `drawData`: associated draw data passed by the caller
-> DrawStateT | `st`: current draw state
-> Float | `control1X`: X component of first control point
-> Float | `control1Y`: Y component of first control point
-> Float | `control2X`: X component of second control point
-> Float | `control2Y`: Y component of second control point
-> Float | `toX`: X component of target point
-> Float | `toY`: Y component of target point
-> m () |

Perform a "cubic-to" draw operation.

Since: 4.0.0

## drawFuncsCreate

drawFuncsCreate Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m DrawFuncsT | Returns: A newly allocated `DrawFuncsT` with a reference count of 1. The initial reference count should be released with hb_draw_funcs_destroy when you are done using the `DrawFuncsT`. This function never returns `NULL`. If memory cannot be allocated, a special singleton `DrawFuncsT` object will be returned.

Creates a new draw callbacks object.

Since: 4.0.0

## drawFuncsGetEmpty

drawFuncsGetEmpty Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m DrawFuncsT | Returns: The empty draw-functions structure

Fetches the singleton empty draw-functions structure.

Since: 7.0.0

## drawFuncsIsImmutable

drawFuncsIsImmutable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> DrawFuncsT | `dfuncs`: draw functions
-> m Int32 | Returns: `true` if `dfuncs` is immutable, `false` otherwise

Checks whether `dfuncs` is immutable.

Since: 4.0.0

## drawFuncsMakeImmutable

drawFuncsMakeImmutable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> DrawFuncsT | `dfuncs`: draw functions
-> m () |

Makes `dfuncs` object immutable.

Since: 4.0.0

## drawLineTo

drawLineTo Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> DrawFuncsT | `dfuncs`: draw functions
-> Ptr () | `drawData`: associated draw data passed by the caller
-> DrawStateT | `st`: current draw state
-> Float | `toX`: X component of target point
-> Float | `toY`: Y component of target point
-> m () |

Perform a "line-to" draw operation.

Since: 4.0.0

## drawMoveTo

drawMoveTo Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> DrawFuncsT | `dfuncs`: draw functions
-> Ptr () | `drawData`: associated draw data passed by the caller
-> DrawStateT | `st`: current draw state
-> Float | `toX`: X component of target point
-> Float | `toY`: Y component of target point
-> m () |

Perform a "move-to" draw operation.

Since: 4.0.0

## drawQuadraticTo

drawQuadraticTo Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> DrawFuncsT | `dfuncs`: draw functions
-> Ptr () | `drawData`: associated draw data passed by the caller
-> DrawStateT | `st`: current draw state
-> Float | `controlX`: X component of control point
-> Float | `controlY`: Y component of control point
-> Float | `toX`: X component of target point
-> Float | `toY`: Y component of target point
-> m () |

Perform a "quadratic-to" draw operation.

Since: 4.0.0

## faceBuilderAddTable

faceBuilderAddTable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: A face object created with `faceBuilderCreate`
-> Word32 | `tag`: The `hb_tag_t` of the table to add
-> BlobT | `blob`: The blob containing the table data to add
-> m Int32 |

Add table for `tag` with data provided by `blob` to the face. `face` must be created using `faceBuilderCreate`.

Since: 1.9.0

## faceBuilderCreate

faceBuilderCreate Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m FaceT | Returns: New face.

Creates a `FaceT` that can be used with `faceBuilderAddTable`. After tables are added to the face, it can be compiled to a binary font file by calling `faceReferenceBlob`.

Since: 1.9.0

## faceBuilderSortTables

faceBuilderSortTables Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: A face object created with `faceBuilderCreate`
-> [Word32] | `tags`: ordered list of table tags terminated by `HB_TAG_NONE`
-> m () |

Set the ordering of tables for serialization. Any tables not specified in the tags list will be ordered after the tables in tags, ordered by the default sort ordering.

Since: 5.3.0

## faceCount

faceCount Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BlobT | `blob`: a blob.
-> m Word32 | Returns: Number of faces in `blob`

Fetches the number of faces in a blob.

Since: 1.7.7

## faceCreate

faceCreate Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BlobT | `blob`: `BlobT` to work upon
-> Word32 | `index`: The index of the face within `blob`
-> m FaceT | Returns: The new face object

Constructs a new face object from the specified blob and a face index into that blob.

The face index is used for blobs of file formats such as TTC and DFont that can contain more than one face. Face indices within such collections are zero-based.

<note>Note: If the blob font format is not a collection, `index` is ignored. Otherwise, only the lower 16-bits of `index` are used. The unmodified `index` can be accessed via `faceGetIndex`.</note>

<note>Note: The high 16-bits of `index`, if non-zero, are used by `fontCreate` to load named-instances in variable fonts. See `fontCreate` for details.</note>

Since: 0.9.2

## faceCreateFromFileOrFail

faceCreateFromFileOrFail Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `fileName`: A font filename
-> Word32 | `index`: The index of the face within the file
-> m FaceT | Returns: The new face object, or `NULL` if no face is found at the specified index or the file cannot be read.

A thin wrapper around `blobCreateFromFileOrFail` followed by `faceCreateOrFail`.

Since: 10.1.0

## faceCreateFromFileOrFailUsing

faceCreateFromFileOrFailUsing Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `fileName`: A font filename
-> Word32 | `index`: The index of the face within the file
-> Maybe Text | `loaderName`: The name of the loader to use, or `NULL`
-> m FaceT | Returns: The new face object, or `NULL` if the file cannot be read or the loader fails to load the face.

A thin wrapper around the face loader functions registered with HarfBuzz. If `loaderName` is `NULL` or the empty string, the first available loader is used.

For example, the FreeType ("ft") loader might be able to load WOFF and WOFF2 files if FreeType is built with those features, whereas the OpenType ("ot") loader will not.

Since: 11.0.0

## faceCreateOrFail

faceCreateOrFail Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BlobT | `blob`: `BlobT` to work upon
-> Word32 | `index`: The index of the face within `blob`
-> m FaceT | Returns: The new face object, or `NULL` if no face is found at the specified index.

Like `faceCreate`, but returns `NULL` if the blob data contains no usable font face at the specified index.

Since: 10.1.0

## faceCreateOrFailUsing

faceCreateOrFailUsing Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BlobT | `blob`: `BlobT` to work upon
-> Word32 | `index`: The index of the face within `blob`
-> Maybe Text | `loaderName`: The name of the loader to use, or `NULL`
-> m FaceT | Returns: The new face object, or `NULL` if the loader fails to load the face.

A thin wrapper around the face loader functions registered with HarfBuzz. If `loaderName` is `NULL` or the empty string, the first available loader is used.

For example, the FreeType ("ft") loader might be able to load WOFF and WOFF2 files if FreeType is built with those features, whereas the OpenType ("ot") loader will not.

Since: 11.0.0

## faceGetEmpty

faceGetEmpty Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m FaceT | Returns: The empty face object

Fetches the singleton empty face object.

Since: 0.9.2

## faceGetGlyphCount

faceGetGlyphCount Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: A face object
-> m Word32 | Returns: The glyph-count value of `face`

Fetches the glyph-count value of the specified face object.

Since: 0.9.7

## faceGetIndex

faceGetIndex Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: A face object
-> m Word32 | Returns: The index of `face`.

Fetches the face-index corresponding to the given face.

<note>Note: face indices within a collection are zero-based.</note>

Since: 0.9.2

## faceGetTableTags

faceGetTableTags Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: A face object
-> Word32 | `startOffset`: The index of first table tag to retrieve
-> m (Word32, [Word32]) | Returns: Total number of tables, or zero if it is not possible to list

Fetches a list of all table tags for a face, if possible. The list returned will begin at the offset provided

Since: 1.6.0

## faceGetUpem

faceGetUpem Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: A face object
-> m Word32 | Returns: The upem value of `face`

Fetches the units-per-em (UPEM) value of the specified face object.

Typical UPEM values for fonts are 1000, or 2048, but any value in between 16 and 16,384 is allowed for OpenType fonts.

Since: 0.9.2

## faceIsImmutable

faceIsImmutable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: A face object
-> m Int32 | Returns: `true` is `face` is immutable, `false` otherwise

Tests whether the given face object is immutable.

Since: 0.9.2

## faceListLoaders

faceListLoaders Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m [Text] | Returns: a `NULL`-terminated array of supported face loaders constant strings. The returned array is owned by HarfBuzz and should not be modified or freed.

Retrieves the list of face loaders supported by HarfBuzz.

Since: 11.0.0

## faceMakeImmutable

faceMakeImmutable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: A face object
-> m () |

Makes the given face object immutable.

Since: 0.9.2

## faceReferenceBlob

faceReferenceBlob Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: A face object
-> m BlobT | Returns: A pointer to the blob for `face`

Fetches a pointer to the binary blob that contains the specified face. If referencing the face data is not possible, this function creates a blob out of individual table blobs if `faceGetTableTags` works with this face, otherwise it returns an empty blob.

Since: 0.9.2

## faceReferenceTable

faceReferenceTable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: A face object
-> Word32 | `tag`: The `hb_tag_t` of the table to query
-> m BlobT | Returns: A pointer to the `tag` table within `face`

Fetches a reference to the specified table within the specified face. Returns an empty blob if referencing table data is not possible.

Since: 0.9.2

## faceSetGlyphCount

faceSetGlyphCount Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: A face object
-> Word32 | `glyphCount`: The glyph-count value to assign
-> m () |

Sets the glyph count for a face object to the specified value.

This API is used in rare circumstances.

Since: 0.9.7

## faceSetIndex

faceSetIndex Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: A face object
-> Word32 | `index`: The index to assign
-> m () |

Assigns the specified face-index to `face`. Fails if the face is immutable.

<note>Note: changing the index has no effect on the face itself This only changes the value returned by `faceGetIndex`.</note>

Since: 0.9.2

## faceSetUpem

faceSetUpem Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: A face object
-> Word32 | `upem`: The units-per-em value to assign
-> m () |

Sets the units-per-em (upem) for a face object to the specified value.

This API is used in rare circumstances.

Since: 0.9.2

## featureFromString

featureFromString Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ByteString | `str`: a string to parse
-> m (Int32, FeatureT) | Returns: `true` if `str` is successfully parsed, `false` otherwise

Parses a string into a `FeatureT`.

The format for specifying feature strings follows. All valid CSS font-feature-settings values other than 'normal' and the global values are also accepted, though not documented below. CSS string escapes are not supported.

The range indices refer to the positions between Unicode characters. The position before the first character is always 0.

The format is Python-esque. Here is how it all works:

<informaltable pgwide='1' align='left' frame='none'> <tgroup cols='5'> <thead> <row><entry>Syntax</entry> <entry>Value</entry> <entry>Start</entry> <entry>End</entry></row> </thead> <tbody> <row><entry>Setting value:</entry></row> <row><entry>kern</entry> <entry>1</entry> <entry>0</entry> <entry>∞</entry> <entry>Turn feature on</entry></row> <row><entry>+kern</entry> <entry>1</entry> <entry>0</entry> <entry>∞</entry> <entry>Turn feature on</entry></row> <row><entry>-kern</entry> <entry>0</entry> <entry>0</entry> <entry>∞</entry> <entry>Turn feature off</entry></row> <row><entry>kern=0</entry> <entry>0</entry> <entry>0</entry> <entry>∞</entry> <entry>Turn feature off</entry></row> <row><entry>kern=1</entry> <entry>1</entry> <entry>0</entry> <entry>∞</entry> <entry>Turn feature on</entry></row> <row><entry>aalt=2</entry> <entry>2</entry> <entry>0</entry> <entry>∞</entry> <entry>Choose 2nd alternate</entry></row> <row><entry>Setting index:</entry></row> <row><entry>kern[]</entry> <entry>1</entry> <entry>0</entry> <entry>∞</entry> <entry>Turn feature on</entry></row> <row><entry>kern[:]</entry> <entry>1</entry> <entry>0</entry> <entry>∞</entry> <entry>Turn feature on</entry></row> <row><entry>kern[5:]</entry> <entry>1</entry> <entry>5</entry> <entry>∞</entry> <entry>Turn feature on, partial</entry></row> <row><entry>kern[:5]</entry> <entry>1</entry> <entry>0</entry> <entry>5</entry> <entry>Turn feature on, partial</entry></row> <row><entry>kern[3:5]</entry> <entry>1</entry> <entry>3</entry> <entry>5</entry> <entry>Turn feature on, range</entry></row> <row><entry>kern[3]</entry> <entry>1</entry> <entry>3</entry> <entry>3+1</entry> <entry>Turn feature on, single char</entry></row> <row><entry>Mixing it all:</entry></row> <row><entry>aalt[3:5]=2</entry> <entry>2</entry> <entry>3</entry> <entry>5</entry> <entry>Turn 2nd alternate on for range</entry></row> </tbody> </tgroup> </informaltable>

Since: 0.9.5

## featureToString

featureToString Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FeatureT | `feature`: an `FeatureT` to convert
-> m [Text] |

Converts a `FeatureT` into a `NULL`-terminated string in the format understood by `featureFromString`. The client in responsible for allocating big enough size for `buf`, 128 bytes is more than enough.

Note that the feature value will be omitted if it is '1', but the string won't include any whitespace.

Since: 0.9.5

## fontAddGlyphOriginForDirection

fontAddGlyphOriginForDirection Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID to query
-> DirectionT | `direction`: The direction of the text segment
-> Int32 | `x`: Input = The original X coordinate Output = The X coordinate plus the X-coordinate of the origin
-> Int32 | `y`: Input = The original Y coordinate Output = The Y coordinate plus the Y-coordinate of the origin
-> m (Int32, Int32) |

Adds the origin coordinates to an (X,Y) point coordinate, in the specified glyph ID in the specified font.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of `direction`.

Since: 0.9.2

## fontChanged

fontChanged Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m () |

Notifies the `font` that underlying font data has changed. This has the effect of increasing the serial as returned by `fontGetSerial`, which invalidates internal caches.

Since: 4.4.0

## fontCreate

fontCreate Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: a face.
-> m FontT | Returns: The new font object

Constructs a new font object from the specified face.

<note>Note: If `face`'s index value (as passed to `faceCreate` has non-zero top 16-bits, those bits minus one are passed to `fontSetVarNamedInstance`, effectively loading a named-instance of a variable font, instead of the default-instance. This allows specifying which named-instance to load by default when creating the face.</note>

Since: 0.9.2

## fontCreateSubFont

fontCreateSubFont Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `parent`: The parent font object
-> m FontT | Returns: The new sub-font font object

Constructs a sub-font font object from the specified `parent` font, replicating the parent's properties.

Since: 0.9.2

## fontDrawGlyph

fontDrawGlyph Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID
-> DrawFuncsT | `dfuncs`: `DrawFuncsT` to draw to
-> Ptr () | `drawData`: User data to pass to draw callbacks
-> m () |

Draws the outline that corresponds to a glyph in the specified `font`.

This is an older name for `fontDrawGlyphOrFail`, with no return value.

The outline is returned by way of calls to the callbacks of the `dfuncs` objects, with `drawData` passed to them.

Since: 7.0.0

## fontDrawGlyphOrFail

fontDrawGlyphOrFail Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID
-> DrawFuncsT | `dfuncs`: `DrawFuncsT` to draw to
-> Ptr () | `drawData`: User data to pass to draw callbacks
-> m Int32 | Returns: `true` if glyph was drawn, `false` otherwise

Draws the outline that corresponds to a glyph in the specified `font`.

This is a newer name for `fontDrawGlyph`, that returns `false` if the font has no outlines for the glyph.

The outline is returned by way of calls to the callbacks of the `dfuncs` objects, with `drawData` passed to them.

Since: 11.2.0

## fontFuncsCreate

fontFuncsCreate Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m FontFuncsT | Returns: The font-functions structure

Creates a new `FontFuncsT` structure of font functions.

Since: 0.9.2

## fontFuncsGetEmpty

fontFuncsGetEmpty Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m FontFuncsT | Returns: The font-functions structure

Fetches an empty font-functions structure.

Since: 0.9.2

## fontFuncsIsImmutable

fontFuncsIsImmutable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontFuncsT | `ffuncs`: The font-functions structure
-> m Int32 | Returns: `true` if `ffuncs` is immutable, `false` otherwise

Tests whether a font-functions structure is immutable.

Since: 0.9.2

## fontFuncsMakeImmutable

fontFuncsMakeImmutable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontFuncsT | `ffuncs`: The font-functions structure
-> m () |

Makes a font-functions structure immutable.

Since: 0.9.2

## fontGetEmpty

fontGetEmpty Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m FontT | Returns: The empty font object

Fetches the empty font object.

Since: 0.9.2

## fontGetExtentsForDirection

fontGetExtentsForDirection Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> DirectionT | `direction`: The direction of the text segment
-> m FontExtentsT |

Fetches the extents for a font in a text segment of the specified direction.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of `direction`.

Since: 1.1.3

## fontGetFace

fontGetFace Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m FaceT | Returns: The `FaceT` value

Fetches the face associated with the specified font object.

Since: 0.9.2

## fontGetGlyph

fontGetGlyph Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `unicode`: The Unicode code point to query
-> Word32 | `variationSelector`: A variation-selector code point
-> m (Int32, Word32) | Returns: `true` if data found, `false` otherwise

Fetches the glyph ID for a Unicode code point in the specified font, with an optional variation selector.

If `variationSelector` is 0, calls `fontGetNominalGlyph`; otherwise calls `fontGetVariationGlyph`.

Since: 0.9.2

## fontGetGlyphAdvanceForDirection

fontGetGlyphAdvanceForDirection Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID to query
-> DirectionT | `direction`: The direction of the text segment
-> m (Int32, Int32) |

Fetches the advance for a glyph ID from the specified font, in a text segment of the specified direction.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of `direction`.

Since: 0.9.2

## fontGetGlyphAdvancesForDirection

fontGetGlyphAdvancesForDirection Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> DirectionT | `direction`: The direction of the text segment
-> Word32 | `count`: The number of glyph IDs in the sequence queried
-> Word32 | `firstGlyph`: The first glyph ID to query
-> Word32 | `glyphStride`: The stride between successive glyph IDs
-> m (Int32, Word32) |

Fetches the advances for a sequence of glyph IDs in the specified font, in a text segment of the specified direction.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of `direction`.

Since: 1.8.6

## fontGetGlyphContourPoint

fontGetGlyphContourPoint Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID to query
-> Word32 | `pointIndex`: The contour-point index to query
-> m (Int32, Int32, Int32) | Returns: `true` if data found, `false` otherwise

Fetches the (x,y) coordinates of a specified contour-point index in the specified glyph, within the specified font.

Since: 0.9.2

## fontGetGlyphContourPointForOrigin

fontGetGlyphContourPointForOrigin Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID to query
-> Word32 | `pointIndex`: The contour-point index to query
-> DirectionT | `direction`: The direction of the text segment
-> m (Int32, Int32, Int32) | Returns: `true` if data found, `false` otherwise

Fetches the (X,Y) coordinates of a specified contour-point index in the specified glyph ID in the specified font, with respect to the origin in a text segment in the specified direction.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of `direction`.

Since: 0.9.2

## fontGetGlyphExtents

fontGetGlyphExtents Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID to query
-> m (Int32, GlyphExtentsT) | Returns: `true` if data found, `false` otherwise

Fetches the `GlyphExtentsT` data for a glyph ID in the specified font.

Since: 0.9.2

## fontGetGlyphExtentsForOrigin

fontGetGlyphExtentsForOrigin Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID to query
-> DirectionT | `direction`: The direction of the text segment
-> m (Int32, GlyphExtentsT) | Returns: `true` if data found, `false` otherwise

Fetches the `GlyphExtentsT` data for a glyph ID in the specified font, with respect to the origin in a text segment in the specified direction.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of `direction`.

Since: 0.9.2

## fontGetGlyphFromName

fontGetGlyphFromName Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> [Text] | `name`: The name string to query
-> m (Int32, Word32) | Returns: `true` if data found, `false` otherwise

Fetches the glyph ID that corresponds to a name string in the specified `font`.

<note>Note: `len` == -1 means the name string is null-terminated.</note>

Since: 0.9.2

## fontGetGlyphHAdvance

fontGetGlyphHAdvance Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID to query
-> m Int32 | Returns: The advance of `glyph` within `font`

Fetches the advance for a glyph ID in the specified font, for horizontal text segments.

Since: 0.9.2

## fontGetGlyphHAdvances

fontGetGlyphHAdvances Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `count`: The number of glyph IDs in the sequence queried
-> Word32 | `firstGlyph`: The first glyph ID to query
-> Word32 | `glyphStride`: The stride between successive glyph IDs
-> Word32 | `advanceStride`: The stride between successive advances
-> m Int32 |

Fetches the advances for a sequence of glyph IDs in the specified font, for horizontal text segments.

Since: 1.8.6

## fontGetGlyphHKerning

fontGetGlyphHKerning Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `leftGlyph`: The glyph ID of the left glyph in the glyph pair
-> Word32 | `rightGlyph`: The glyph ID of the right glyph in the glyph pair
-> m Int32 | Returns: The kerning adjustment value

Fetches the kerning-adjustment value for a glyph-pair in the specified font, for horizontal text segments.

<note>It handles legacy kerning only (as returned by the corresponding `FontFuncsT` function).</note>

Since: 0.9.2

## fontGetGlyphHOrigin

fontGetGlyphHOrigin Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID to query
-> m (Int32, Int32, Int32) | Returns: `true` if data found, `false` otherwise

Fetches the (X,Y) coordinates of the origin for a glyph ID in the specified font, for horizontal text segments.

Since: 0.9.2

## fontGetGlyphHOrigins

fontGetGlyphHOrigins Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `count`: The number of glyph IDs in the sequence queried
-> Word32 | `firstGlyph`: The first glyph ID to query
-> Word32 | `glyphStride`: The stride between successive glyph IDs
-> Word32 | `xStride`: The stride between successive X coordinates
-> Word32 | `yStride`: The stride between successive Y coordinates
-> m (Int32, Int32, Int32) | Returns: `true` if data found, `false` otherwise

Fetches the (X,Y) coordinates of the origin for requested glyph IDs in the specified font, for horizontal text segments.

Since: 11.3.0

## fontGetGlyphKerningForDirection

fontGetGlyphKerningForDirection Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `firstGlyph`: The glyph ID of the first glyph in the glyph pair to query
-> Word32 | `secondGlyph`: The glyph ID of the second glyph in the glyph pair to query
-> DirectionT | `direction`: The direction of the text segment
-> m (Int32, Int32) |

Fetches the kerning-adjustment value for a glyph-pair in the specified font.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of `direction`.

Since: 0.9.2

## fontGetGlyphName

fontGetGlyphName Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID to query
-> m (Int32, [Text]) | Returns: `true` if data found, `false` otherwise

Fetches the glyph-name string for a glyph ID in the specified `font`.

According to the OpenType specification, glyph names are limited to 63 characters and can only contain (a subset of) ASCII.

Since: 0.9.2

## fontGetGlyphOriginForDirection

fontGetGlyphOriginForDirection Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID to query
-> DirectionT | `direction`: The direction of the text segment
-> m (Int32, Int32) |

Fetches the (X,Y) coordinates of the origin for a glyph in the specified font.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of `direction`.

Since: 0.9.2

## fontGetGlyphShape

fontGetGlyphShape Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID
-> DrawFuncsT | `dfuncs`: `DrawFuncsT` to draw to
-> Ptr () | `drawData`: User data to pass to draw callbacks
-> m () |

Deprecated: (Since version 7.0.0)Use `fontDrawGlyph` instead

Fetches the glyph shape that corresponds to a glyph in the specified `font`. The shape is returned by way of calls to the callbacks of the `dfuncs` objects, with `drawData` passed to them.

Since: 4.0.0

## fontGetGlyphVAdvance

fontGetGlyphVAdvance Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID to query
-> m Int32 | Returns: The advance of `glyph` within `font`

Fetches the advance for a glyph ID in the specified font, for vertical text segments.

Since: 0.9.2

## fontGetGlyphVAdvances

fontGetGlyphVAdvances Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `count`: The number of glyph IDs in the sequence queried
-> Word32 | `firstGlyph`: The first glyph ID to query
-> Word32 | `glyphStride`: The stride between successive glyph IDs
-> m (Int32, Word32) |

Fetches the advances for a sequence of glyph IDs in the specified font, for vertical text segments.

Since: 1.8.6

## fontGetGlyphVKerning

fontGetGlyphVKerning Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `topGlyph`: The glyph ID of the top glyph in the glyph pair
-> Word32 | `bottomGlyph`: The glyph ID of the bottom glyph in the glyph pair
-> m Int32 | Returns: The kerning adjustment value

Deprecated: (Since version 2.0.0)

Fetches the kerning-adjustment value for a glyph-pair in the specified font, for vertical text segments.

<note>It handles legacy kerning only (as returned by the corresponding `FontFuncsT` function).</note>

Since: 0.9.2

## fontGetGlyphVOrigin

fontGetGlyphVOrigin Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID to query
-> m (Int32, Int32, Int32) | Returns: `true` if data found, `false` otherwise

Fetches the (X,Y) coordinates of the origin for a glyph ID in the specified font, for vertical text segments.

Since: 0.9.2

## fontGetGlyphVOrigins

fontGetGlyphVOrigins Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `count`: The number of glyph IDs in the sequence queried
-> Word32 | `firstGlyph`: The first glyph ID to query
-> Word32 | `glyphStride`: The stride between successive glyph IDs
-> Word32 | `xStride`: The stride between successive X coordinates
-> Word32 | `yStride`: The stride between successive Y coordinates
-> m (Int32, Int32, Int32) | Returns: `true` if data found, `false` otherwise

Fetches the (X,Y) coordinates of the origin for requested glyph IDs in the specified font, for vertical text segments.

Since: 11.3.0

## fontGetHExtents

fontGetHExtents Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m (Int32, FontExtentsT) | Returns: `true` if data found, `false` otherwise

Fetches the extents for a specified font, for horizontal text segments.

Since: 1.1.3

## fontGetNominalGlyph

fontGetNominalGlyph Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `unicode`: The Unicode code point to query
-> m (Int32, Word32) | Returns: `true` if data found, `false` otherwise

Fetches the nominal glyph ID for a Unicode code point in the specified font.

This version of the function should not be used to fetch glyph IDs for code points modified by variation selectors. For variation-selector support, user `fontGetVariationGlyph` or use `fontGetGlyph`.

Since: 1.2.3

## fontGetNominalGlyphs

fontGetNominalGlyphs Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `count`: number of code points to query
-> Word32 | `firstUnicode`: The first Unicode code point to query
-> Word32 | `unicodeStride`: The stride between successive code points
-> Word32 | `glyphStride`: The stride between successive glyph IDs
-> m (Word32, Word32) | Returns: the number of code points processed

Fetches the nominal glyph IDs for a sequence of Unicode code points. Glyph IDs must be returned in a `hb_codepoint_t` output parameter. Stops at the first unsupported glyph ID.

Since: 2.6.3

## fontGetParent

fontGetParent Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m FontT | Returns: The parent font object

Fetches the parent font of `font`.

Since: 0.9.2

## fontGetPpem

fontGetPpem Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m (Word32, Word32) |

Fetches the horizontal and vertical points-per-em (ppem) of a font.

Since: 0.9.2

## fontGetPtem

fontGetPtem Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m Float | Returns: Point size. A value of zero means "not set."

Fetches the "point size" of a font. Used in CoreText to implement optical sizing.

Since: 1.6.0

## fontGetScale

fontGetScale Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m (Int32, Int32) |

Fetches the horizontal and vertical scale of a font.

Since: 0.9.2

## fontGetSerial

fontGetSerial Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m Word32 | Returns: serial number

Returns the internal serial number of the font. The serial number is increased every time a setting on the font is changed, using a setter function.

Since: 4.4.0

## fontGetSyntheticBold

fontGetSyntheticBold Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m (Float, Float, Int32) |

Fetches the "synthetic boldness" parameters of a font.

Since: 7.0.0

## fontGetSyntheticSlant

fontGetSyntheticSlant Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m Float | Returns: Synthetic slant. By default is zero.

Fetches the "synthetic slant" of a font.

Since: 3.3.0

## fontGetVExtents

fontGetVExtents Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m (Int32, FontExtentsT) | Returns: `true` if data found, `false` otherwise

Fetches the extents for a specified font, for vertical text segments.

Since: 1.1.3

## fontGetVarCoordsDesign

fontGetVarCoordsDesign Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m (Float, Word32) | Returns: coordinates array

Fetches the list of variation coordinates (in design-space units) currently set on a font.

<note>Note that if no variation coordinates are set, this function may return `Nothing`.</note>

<note>If variations have been set on the font using normalized coordinates (i.e. via `fontSetVarCoordsNormalized`), the design coordinates will have NaN (Not a Number) values.</note>

Return value is valid as long as variation coordinates of the font are not modified.

Since: 3.3.0

## fontGetVarCoordsNormalized

fontGetVarCoordsNormalized Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m (Int32, Word32) | Returns: coordinates array

Fetches the list of normalized variation coordinates currently set on a font.

<note>Note that if no variation coordinates are set, this function may return `Nothing`.</note>

Return value is valid as long as variation coordinates of the font are not modified.

Since: 1.4.2

## fontGetVarNamedInstance

fontGetVarNamedInstance Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: a font.
-> m Word32 | Returns: Named-instance index or `FONT_NO_VAR_NAMED_INSTANCE`.

Returns the currently-set named-instance index of the font.

Since: 7.0.0

## fontGetVariationGlyph

fontGetVariationGlyph Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `unicode`: The Unicode code point to query
-> Word32 | `variationSelector`: The variation-selector code point to query
-> m (Int32, Word32) | Returns: `true` if data found, `false` otherwise

Fetches the glyph ID for a Unicode code point when followed by by the specified variation-selector code point, in the specified font.

Since: 1.2.3

## fontGlyphFromString

fontGlyphFromString Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> ByteString | `s`: string to query
-> m (Int32, Word32) | Returns: `true` if data found, `false` otherwise

Fetches the glyph ID from `font` that matches the specified string. Strings of the format `gidDDD` or `uniUUUU` are parsed automatically.

<note>Note: `len` == -1 means the string is null-terminated.</note>

Since: 0.9.2

## fontGlyphToString

fontGlyphToString Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID to query
-> m [Text] |

Fetches the name of the specified glyph ID in `font` and returns it in string `s`.

If the glyph ID has no name in `font`, a string of the form `gidDDD` is generated, with `DDD` being the glyph ID.

According to the OpenType specification, glyph names are limited to 63 characters and can only contain (a subset of) ASCII.

Since: 0.9.2

## fontIsImmutable

fontIsImmutable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m Int32 | Returns: `true` if `font` is immutable, `false` otherwise

Tests whether a font object is immutable.

Since: 0.9.2

## fontIsSynthetic

fontIsSynthetic Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m Int32 | Returns: `true` if the font is synthetic, `false` otherwise.

Tests whether a font is synthetic. A synthetic font is one that has either synthetic slant or synthetic bold set on it.

Since: 11.2.0

## fontListFuncs

fontListFuncs Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m [Text] | Returns: a `NULL`-terminated array of supported font functions constant strings. The returned array is owned by HarfBuzz and should not be modified or freed.

Retrieves the list of font functions supported by HarfBuzz.

Since: 11.0.0

## fontMakeImmutable

fontMakeImmutable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m () |

Makes `font` immutable.

Since: 0.9.2

## fontPaintGlyph

fontPaintGlyph Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID
-> PaintFuncsT | `pfuncs`: `PaintFuncsT` to paint with
-> Ptr () | `paintData`: User data to pass to paint callbacks
-> Word32 | `paletteIndex`: The index of the font's color palette to use
-> Word32 | `foreground`: The foreground color, unpremultipled
-> m () |

Paints the glyph. This function is similar to `fontPaintGlyphOrFail`, but if painting a color glyph failed, it will fall back to painting an outline monochrome glyph.

The painting instructions are returned by way of calls to the callbacks of the `funcs` object, with `paintData` passed to them.

If the font has color palettes (see `otColorHasPalettes`), then `paletteIndex` selects the palette to use. If the font only has one palette, this will be 0.

Since: 7.0.0

## fontPaintGlyphOrFail

fontPaintGlyphOrFail Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID
-> PaintFuncsT | `pfuncs`: `PaintFuncsT` to paint with
-> Ptr () | `paintData`: User data to pass to paint callbacks
-> Word32 | `paletteIndex`: The index of the font's color palette to use
-> Word32 | `foreground`: The foreground color, unpremultipled
-> m Int32 | Returns: `true` if glyph was painted, `false` otherwise

Paints a color glyph.

This function is similar to, but lower-level than, `fontPaintGlyph`. It is suitable for clients that need more control. If there are no color glyphs available, it will return `false`. The client can then fall back to `fontDrawGlyphOrFail` for the monochrome outline glyph.

The painting instructions are returned by way of calls to the callbacks of the `funcs` object, with `paintData` passed to them.

If the font has color palettes (see `otColorHasPalettes`), then `paletteIndex` selects the palette to use. If the font only has one palette, this will be 0.

Since: 11.2.0

## fontSetFace

fontSetFace Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> FaceT | `face`: The `FaceT` to assign
-> m () |

Sets `face` as the font-face value of `font`.

Since: 1.4.3

## fontSetFuncsUsing

fontSetFuncsUsing Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Text | `name`: The name of the font-functions structure to use, or `NULL`
-> m Int32 | Returns: `true` if the font-functions was found and set, `false` otherwise

Sets the font-functions structure to use for a font, based on the specified name.

If `name` is `NULL` or the empty string, the default (first) functioning font-functions are used. This default can be changed by setting the `HB_FONT_FUNCS` environment variable to the name of the desired font-functions.

Since: 11.0.0

## fontSetParent

fontSetParent Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> FontT | `parent`: The parent font object to assign
-> m () |

Sets the parent font of `font`.

Since: 1.0.5

## fontSetPpem

fontSetPpem Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `xPpem`: Horizontal ppem value to assign
-> Word32 | `yPpem`: Vertical ppem value to assign
-> m () |

Sets the horizontal and vertical pixels-per-em (PPEM) of a font.

These values are used for pixel-size-specific adjustment to shaping and draw results, though for the most part they are unused and can be left unset.

Since: 0.9.2

## fontSetPtem

fontSetPtem Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Float | `ptem`: font size in points.
-> m () |

Sets the "point size" of a font. Set to zero to unset. Used in CoreText to implement optical sizing.

<note>Note: There are 72 points in an inch.</note>

Since: 1.6.0

## fontSetScale

fontSetScale Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Int32 | `xScale`: Horizontal scale value to assign
-> Int32 | `yScale`: Vertical scale value to assign
-> m () |

Sets the horizontal and vertical scale of a font.

The font scale is a number related to, but not the same as, font size. Typically the client establishes a scale factor to be used between the two. For example, 64, or 256, which would be the fractional-precision part of the font scale. This is necessary because `hb_position_t` values are integer types and you need to leave room for fractional values in there.

For example, to set the font size to 20, with 64 levels of fractional precision you would call `hb_font_set_scale(font, 20 * 64, 20 * 64)`.

In the example above, even what font size 20 means is up to you. It might be 20 pixels, or 20 points, or 20 millimeters. HarfBuzz does not care about that. You can set the point size of the font using `fontSetPtem`, and the pixel size using `fontSetPpem`.

The choice of scale is yours but needs to be consistent between what you set here, and what you expect out of `hb_position_t` as well has draw / paint API output values.

Fonts default to a scale equal to the UPEM value of their face. A font with this setting is sometimes called an "unscaled" font.

Since: 0.9.2

## fontSetSyntheticBold

fontSetSyntheticBold Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Float | `xEmbolden`: the amount to embolden horizontally
-> Float | `yEmbolden`: the amount to embolden vertically
-> Int32 | `inPlace`: whether to embolden glyphs in-place
-> m () |

Sets the "synthetic boldness" of a font.

Positive values for `xEmbolden` / `yEmbolden` make a font bolder, negative values thinner. Typical values are in the 0.01 to 0.05 range. The default value is zero.

Synthetic boldness is applied by offsetting the contour points of the glyph shape.

Synthetic boldness is applied when rendering a glyph via `fontDrawGlyphOrFail`.

If `inPlace` is `false`, then glyph advance-widths are also adjusted, otherwise they are not. The in-place mode is useful for simulating font grading.

Since: 7.0.0

## fontSetSyntheticSlant

fontSetSyntheticSlant Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Float | `slant`: synthetic slant value.
-> m () |

Sets the "synthetic slant" of a font. By default is zero. Synthetic slant is the graphical skew applied to the font at rendering time.

HarfBuzz needs to know this value to adjust shaping results, metrics, and style values to match the slanted rendering.

<note>Note: The glyph shape fetched via the `fontDrawGlyphOrFail` function is slanted to reflect this value as well.</note>

<note>Note: The slant value is a ratio. For example, a 20% slant would be represented as a 0.2 value.</note>

Since: 3.3.0

## fontSetVarCoordsDesign

fontSetVarCoordsDesign Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> [Float] | `coords`: Array of variation coordinates to apply
-> m () |

Applies a list of variation coordinates (in design-space units) to a font.

Note that this overrides all existing variations set on `font`. Axes not included in `coords` will be effectively set to their default values.

Since: 1.4.2

## fontSetVarCoordsNormalized

fontSetVarCoordsNormalized Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> [Int32] | `coords`: Array of variation coordinates to apply
-> m () |

Applies a list of variation coordinates (in normalized units) to a font.

Note that this overrides all existing variations set on `font`. Axes not included in `coords` will be effectively set to their default values.

<note>Note: Coordinates should be normalized to 2.14.</note>

Since: 1.4.2

## fontSetVarNamedInstance

fontSetVarNamedInstance Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: a font.
-> Word32 | `instanceIndex`: named instance index.
-> m () |

Sets design coords of a font from a named-instance index.

Since: 2.6.0

## fontSetVariation

fontSetVariation Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `tag`: The `hb_tag_t` tag of the variation-axis name
-> Float | `value`: The value of the variation axis
-> m () |

Change the value of one variation axis on the font.

Note: This function is expensive to be called repeatedly. If you want to set multiple variation axes at the same time, use `fontSetVariations` instead.

Since: 7.1.0

## fontSetVariations

fontSetVariations Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> [VariationT] | `variations`: Array of variation settings to apply
-> m () |

Applies a list of font-variation settings to a font.

Note that this overrides all existing variations set on `font`. Axes not included in `variations` will be effectively set to their default values.

Since: 1.4.2

## fontSubtractGlyphOriginForDirection

fontSubtractGlyphOriginForDirection Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph ID to query
-> DirectionT | `direction`: The direction of the text segment
-> Int32 | `x`: Input = The original X coordinate Output = The X coordinate minus the X-coordinate of the origin
-> Int32 | `y`: Input = The original Y coordinate Output = The Y coordinate minus the Y-coordinate of the origin
-> m (Int32, Int32) |

Subtracts the origin coordinates from an (X,Y) point coordinate, in the specified glyph ID in the specified font.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of `direction`.

Since: 0.9.2

## free

free Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Ptr () | `ptr`: The pointer to the memory to free.
-> m () |

Frees the memory pointed to by `ptr`, using the allocator set at compile-time. Typically just `free()`.

Since: 11.0.0

## ftFaceCreateCached

ftFaceCreateCached Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Face | `ftFace`: FT_Face to work upon
-> m FaceT | Returns: the new `FaceT` face object

Creates an `FaceT` face object from the specified FT_Face.

Note that this is using the FT_Face object just to get at the underlying font data, and fonts created from the returned `FaceT` will use the native HarfBuzz font implementation, unless you call `ftFontSetFuncs` on them.

This variant of the function caches the newly created `FaceT` face object, using the `generic` pointer of `ftFace`. Subsequent function calls that are passed the same `ftFace` parameter will have the same `FaceT` returned to them, and that `FaceT` will be correctly reference counted.

However, client programs are still responsible for destroying `ftFace` after the last `FaceT` face object has been destroyed.

Since: 0.9.2

## ftFaceCreateFromBlobOrFail

ftFaceCreateFromBlobOrFail Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> BlobT | `blob`: A blob
-> Word32 | `index`: The index of the face within the blob
-> m FaceT | Returns: The new face object, or `NULL` if loading fails (eg. blob does not contain valid font data).

Creates an `FaceT` face object from the specified font blob and face index.

This is similar in functionality to `hb_face_create_from_blob_or_fail()`, but uses the FreeType library for loading the font blob. This can be useful, for example, to load WOFF and WOFF2 font data.

Since: 11.0.0

## ftFaceCreateFromFileOrFail

ftFaceCreateFromFileOrFail Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `fileName`: A font filename
-> Word32 | `index`: The index of the face within the file
-> m FaceT | Returns: The new face object, or `NULL` if no face is found at the specified index or the file cannot be read.

Creates an `FaceT` face object from the specified font file and face index.

This is similar in functionality to `faceCreateFromFileOrFail`, but uses the FreeType library for loading the font file. This can be useful, for example, to load WOFF and WOFF2 font data.

Since: 10.1.0

## ftFaceCreateReferenced

ftFaceCreateReferenced Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Face | `ftFace`: FT_Face to work upon
-> m FaceT | Returns: the new `FaceT` face object

Creates an `FaceT` face object from the specified FT_Face.

Note that this is using the FT_Face object just to get at the underlying font data, and fonts created from the returned `FaceT` will use the native HarfBuzz font implementation, unless you call `ftFontSetFuncs` on them.

This is the preferred variant of the hb_ft_face_create* function family, because it calls `FT_Reference_Face()` on `ftFace`, ensuring that `ftFace` remains alive as long as the resulting `FaceT` face object remains alive. Also calls `FT_Done_Face()` when the `FaceT` face object is destroyed.

Use this version unless you know you have good reasons not to.

Since: 0.9.38

## ftFontChanged

ftFontChanged Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m () |

Refreshes the state of `font` when the underlying FT_Face has changed. This function should be called after changing the size or variation-axis settings on the FT_Face.

Since: 1.0.5

## ftFontCreateReferenced

ftFontCreateReferenced Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Face | `ftFace`: FT_Face to work upon
-> m FontT | Returns: the new `FontT` font object

Creates an `FontT` font object from the specified FT_Face.

<note>Note: You must set the face size on `ftFace` before calling `ftFontCreateReferenced` on it. HarfBuzz assumes size is always set and will access `size` member of FT_Face unconditionally.</note>

This is the preferred variant of the hb_ft_font_create* function family, because it calls `FT_Reference_Face()` on `ftFace`, ensuring that `ftFace` remains alive as long as the resulting `FontT` font object remains alive.

Use this version unless you know you have good reasons not to.

Since: 0.9.38

## ftFontGetLoadFlags

ftFontGetLoadFlags Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m Int32 | Returns: FT_Load_Glyph flags found, or 0

Fetches the FT_Load_Glyph load flags of the specified `FontT`.

For more information, see <https://freetype.org/freetype2/docs/reference/ft2-glyph_retrieval.html`ft_load_xxx`>

This function works with `FontT` objects created by `hb_ft_font_create()` or `ftFontCreateReferenced`.

Since: 1.0.5

## ftFontSetFuncs

ftFontSetFuncs Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m () |

Configures the font-functions structure of the specified `FontT` font object to use FreeType font functions.

In particular, you can use this function to configure an existing `FaceT` face object for use with FreeType font functions even if that `FaceT` face object was initially created with `faceCreate`, and therefore was not initially configured to use FreeType font functions.

An `FontT` object created with `hb_ft_font_create()` is preconfigured for FreeType font functions and does not require this function to be used.

Note that if you modify the underlying `FontT` after calling this function, you need to call `ftHbFontChanged` to update the underlying FT_Face.

<note>Note: Internally, this function creates an FT_Face. </note>

Since: 1.0.5

## ftFontSetLoadFlags

ftFontSetLoadFlags Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Int32 | `loadFlags`: The FreeType load flags to set
-> m () |

Sets the FT_Load_Glyph load flags for the specified `FontT`.

For more information, see <https://freetype.org/freetype2/docs/reference/ft2-glyph_retrieval.html`ft_load_xxx`>

This function works with `FontT` objects created by `hb_ft_font_create()` or `ftFontCreateReferenced`.

Since: 1.0.5

## ftHbFontChanged

ftHbFontChanged Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m Int32 | Returns: true if changed, false otherwise

Refreshes the state of the underlying FT_Face of `font` when the hb_font_t `font` has changed. This function should be called after changing the size or variation-axis settings on the `font`. This call is fast if nothing has changed on `font`.

Note that as of version 11.0.0, calling this function is not necessary, as HarfBuzz will automatically detect changes to the font and update the underlying FT_Face as needed.

Since: 4.4.0

## glibBlobCreate

glibBlobCreate Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Bytes | `gbytes`: the GBytes structure to work upon
-> m BlobT | Returns: the new `BlobT` blob object

Creates an `BlobT` blob from the specified GBytes data structure.

Since: 0.9.38

## glibGetUnicodeFuncs

glibGetUnicodeFuncs Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m UnicodeFuncsT | Returns: a pointer to the `UnicodeFuncsT` Unicode-functions structure

Fetches a Unicode-functions structure that is populated with the appropriate GLib function for each method.

Since: 0.9.38

## glibScriptFromScript

glibScriptFromScript Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ScriptT | `script`: The `ScriptT` to query
-> m UnicodeScript | Returns: the GUnicodeScript identifier found

Fetches the GUnicodeScript identifier that corresponds to the specified `ScriptT` script.

Since: 0.9.38

## glibScriptToScript

glibScriptToScript Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnicodeScript | `script`: The GUnicodeScript identifier to query
-> m ScriptT | Returns: the `ScriptT` script found

Fetches the `ScriptT` script that corresponds to the specified GUnicodeScript identifier.

Since: 0.9.38

## glyphInfoGetGlyphFlags

glyphInfoGetGlyphFlags Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> GlyphInfoT | `info`: a `GlyphInfoT`
-> m [GlyphFlagsT] | Returns: The `GlyphFlagsT` encoded within `info`

Returns glyph flags encoded within a `GlyphInfoT`.

Since: 1.5.0

## languageFromString

languageFromString Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ByteString | `str`: a string representing a BCP 47 language tag
-> m LanguageT | Returns: The `LanguageT` corresponding to the BCP 47 language tag.

Converts `str` representing a BCP 47 language tag to the corresponding `LanguageT`.

Since: 0.9.2

## languageGetDefault

languageGetDefault Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m LanguageT | Returns: The default language of the locale as an `LanguageT`

Fetch the default language from current locale.

<note>Note that the first time this function is called, it calls "setlocale (LC_CTYPE, nullptr)" to fetch current locale. The underlying setlocale function is, in many implementations, NOT threadsafe. To avoid problems, call this function once before multiple threads can call it. This function is only used from `bufferGuessSegmentProperties` by HarfBuzz itself.</note>

Since: 0.9.2

## languageMatches

languageMatches Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> LanguageT | `language`: The `LanguageT` to work on
-> LanguageT | `specific`: Another `LanguageT`
-> m Int32 | Returns: `true` if languages match, `false` otherwise.

Check whether a second language tag is the same or a more specific version of the provided language tag. For example, "fa_IR.utf8" is a more specific tag for "fa" or for "fa_IR".

Since: 5.0.0

## languageToString

languageToString Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> LanguageT | `language`: The `LanguageT` to convert
-> m Text | Returns: A `NULL`-terminated string representing the `language`. Must not be freed by the caller.

Converts an `LanguageT` to a string.

Since: 0.9.2

## malloc

malloc Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> CSize | `size`: The size of the memory to allocate.
-> m (Ptr ()) | Returns: A pointer to the allocated memory.

Allocates `size` bytes of memory, using the allocator set at compile-time. Typically just `malloc()`.

Since: 11.0.0

## mapAllocationSuccessful

mapAllocationSuccessful Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> MapT | `map`: A map
-> m Int32 | Returns: `true` if allocation succeeded, `false` otherwise

Tests whether memory allocation for a set was successful.

Since: 1.7.7

## mapClear

mapClear Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> MapT | `map`: A map
-> m () |

Clears out the contents of `map`.

Since: 1.7.7

## mapCopy

mapCopy Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> MapT | `map`: A map
-> m MapT | Returns: Newly-allocated map.

Allocate a copy of `map`.

Since: 4.4.0

## mapCreate

mapCreate Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m MapT | Returns: The new `MapT`

Creates a new, initially empty map.

Since: 1.7.7

## mapDel

mapDel Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> MapT | `map`: A map
-> Word32 | `key`: The key to delete
-> m () |

Removes `key` and its stored value from `map`.

Since: 1.7.7

## mapGet

mapGet Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> MapT | `map`: A map
-> Word32 | `key`: The key to query
-> m Word32 |

Fetches the value stored for `key` in `map`.

Since: 1.7.7

## mapGetEmpty

mapGetEmpty Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m MapT | Returns: The empty `MapT`

Fetches the singleton empty `MapT`.

Since: 1.7.7

## mapGetPopulation

mapGetPopulation Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> MapT | `map`: A map
-> m Word32 | Returns: The population of `map`

Returns the number of key-value pairs in the map.

Since: 1.7.7

## mapHas

mapHas Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> MapT | `map`: A map
-> Word32 | `key`: The key to query
-> m Int32 | Returns: `true` if `key` is found in `map`, `false` otherwise

Tests whether `key` is an element of `map`.

Since: 1.7.7

## mapHash

mapHash Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> MapT | `map`: A map
-> m Word32 | Returns: A hash of `map`.

Creates a hash representing `map`.

Since: 4.4.0

## mapIsEmpty

mapIsEmpty Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> MapT | `map`: A map
-> m Int32 | Returns: `true` if `map` is empty

Tests whether `map` is empty (contains no elements).

Since: 1.7.7

## mapIsEqual

mapIsEqual Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> MapT | `map`: A map
-> MapT | `other`: Another map
-> m Int32 | Returns: `true` if the two maps are equal, `false` otherwise.

Tests whether `map` and `other` are equal (contain the same elements).

Since: 4.3.0

## mapKeys

mapKeys Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> MapT | `map`: A map
-> SetT | `keys`: A set
-> m () |

Add the keys of `map` to `keys`.

Since: 7.0.0

## mapNext

mapNext Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> MapT | `map`: A map
-> Int32 | `idx`: Iterator internal state
-> m (Int32, Int32, Word32, Word32) | Returns: `true` if there was a next value, `false` otherwise

Fetches the next key/value pair in `map`.

Set `idx` to -1 to get started.

If the map is modified during iteration, the behavior is undefined.

The order in which the key/values are returned is undefined.

Since: 7.0.0

## mapSet

mapSet Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> MapT | `map`: A map
-> Word32 | `key`: The key to store in the map
-> Word32 | `value`: The value to store for `key`
-> m () |

Stores `key`:`value` in the map.

Since: 1.7.7

## mapUpdate

mapUpdate Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> MapT | `map`: A map
-> MapT | `other`: Another map
-> m () |

Add the contents of `other` to `map`.

Since: 7.0.0

## mapValues

mapValues Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> MapT | `map`: A map
-> SetT | `values`: A set
-> m () |

Add the values of `map` to `values`.

Since: 7.0.0

## otColorGlyphGetLayers

otColorGlyphGetLayers Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `glyph`: The glyph index to query
-> Word32 | `startOffset`: offset of the first layer to retrieve
-> Maybe [OtColorLayerT] | `layers`: The array of layers found
-> m (Word32, Maybe [OtColorLayerT]) | Returns: Total number of layers available for the glyph index queried

Fetches a list of all color layers for the specified glyph index in the specified face. The list returned will begin at the offset provided.

Since: 2.1.0

## otColorGlyphHasPaint

otColorGlyphHasPaint Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `glyph`: The glyph index to query
-> m Int32 | Returns: `true` if data found, `false` otherwise

Tests where a face includes COLRv1 paint data for `glyph`.

Since: 7.0.0

## otColorGlyphReferencePng

otColorGlyphReferencePng Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: a glyph index
-> m BlobT | Returns: An `BlobT` containing the PNG image for the glyph, if available

Fetches the PNG image for a glyph. This function takes a font object, not a face object, as input. To get an optimally sized PNG blob, the PPEM values must be set on the `font` object. If PPEM is unset, the blob returned will be the largest PNG available.

If the glyph has no PNG image, the singleton empty blob is returned.

Since: 2.1.0

## otColorGlyphReferenceSvg

otColorGlyphReferenceSvg Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `glyph`: a svg glyph index
-> m BlobT | Returns: An `BlobT` containing the SVG document of the glyph, if available

Fetches the SVG document for a glyph. The blob may be either plain text or gzip-encoded.

If the glyph has no SVG document, the singleton empty blob is returned.

Since: 2.1.0

## otColorHasLayers

otColorHasLayers Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> m Int32 | Returns: `true` if data found, `false` otherwise

Tests whether a face includes a `COLR` table with data according to COLRv0.

Since: 2.1.0

## otColorHasPaint

otColorHasPaint Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> m Int32 | Returns: `true` if data found, `false` otherwise

Tests where a face includes a `COLR` table with data according to COLRv1.

Since: 7.0.0

## otColorHasPalettes

otColorHasPalettes Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> m Int32 | Returns: `true` if data found, `false` otherwise

Tests whether a face includes a `CPAL` color-palette table.

Since: 2.1.0

## otColorHasPng

otColorHasPng Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> m Int32 | Returns: `true` if data found, `false` otherwise

Tests whether a face has PNG glyph images (either in `CBDT` or `sbix` tables).

Since: 2.1.0

## otColorHasSvg

otColorHasSvg Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon.
-> m Int32 | Returns: `true` if data found, `false` otherwise.

Tests whether a face includes any `SVG` glyph images.

Since: 2.1.0

## otColorPaletteColorGetNameId

otColorPaletteColorGetNameId Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `colorIndex`: The index of the color
-> m Word32 | Returns: the Name ID found for the color.

Fetches the `name` table Name ID that provides display names for the specified color in a face's `CPAL` color palette.

Display names can be generic (e.g., "Background") or specific (e.g., "Eye color").

Since: 2.1.0

## otColorPaletteGetColors

otColorPaletteGetColors Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `paletteIndex`: the index of the color palette to query
-> Word32 | `startOffset`: offset of the first color to retrieve
-> m (Word32, Maybe [Word32]) | Returns: the total number of colors in the palette

Fetches a list of the colors in a color palette.

After calling this function, `colors` will be filled with the palette colors. If `colors` is NULL, the function will just return the number of total colors without storing any actual colors; this can be used for allocating a buffer of suitable size before calling `otColorPaletteGetColors` a second time.

The RGBA values in the palette are unpremultiplied. See the OpenType spec CPAL section for details.

Since: 2.1.0

## otColorPaletteGetCount

otColorPaletteGetCount Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> m Word32 | Returns: the number of palettes found

Fetches the number of color palettes in a face.

Since: 2.1.0

## otColorPaletteGetFlags

otColorPaletteGetFlags Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `paletteIndex`: The index of the color palette
-> m [OtColorPaletteFlagsT] | Returns: the `OtColorPaletteFlagsT` of the requested color palette

Fetches the flags defined for a color palette.

Since: 2.1.0

## otColorPaletteGetNameId

otColorPaletteGetNameId Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `paletteIndex`: The index of the color palette
-> m Word32 | Returns: the Named ID found for the palette. If the requested palette has no name the result is `HB_OT_NAME_ID_INVALID`.

Fetches the `name` table Name ID that provides display names for a `CPAL` color palette.

Palette display names can be generic (e.g., "Default") or provide specific, themed names (e.g., "Spring", "Summer", "Fall", and "Winter").

Since: 2.1.0

## otFontSetFuncs

otFontSetFuncs Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> m () |

Sets the font functions to use when working with `font` to the HarfBuzz's native implementation. This is the default for fonts newly created.

Since: 0.9.28

## otLayoutFeatureGetCharacters

otLayoutFeatureGetCharacters Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: table tag to query, "GSUB" or "GPOS".
-> Word32 | `featureIndex`: index of feature to query.
-> Word32 | `startOffset`: offset of the first character to retrieve
-> [Word32] | `characters`: A buffer pointer. The Unicode codepoints of the characters for which this feature provides glyph variants.
-> m (Word32, [Word32]) | Returns: Number of total sample characters in the cvXX feature.

Fetches a list of the characters defined as having a variant under the specified "Character Variant" ("cvXX") feature tag.

Since: 2.0.0

## otLayoutFeatureGetLookups

otLayoutFeatureGetLookups Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> Word32 | `featureIndex`: The index of the requested feature
-> Word32 | `startOffset`: offset of the first lookup to retrieve
-> m (Word32, [Word32]) | Returns: Total number of lookups.

Fetches a list of all lookups enumerated for the specified feature, in the specified face's GSUB table or GPOS table. The list returned will begin at the offset provided.

Since: 0.9.7

## otLayoutFeatureGetNameIds

otLayoutFeatureGetNameIds Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: table tag to query, "GSUB" or "GPOS".
-> Word32 | `featureIndex`: index of feature to query.
-> m (Int32, Word32, Word32, Word32, Word32, Word32) | Returns: `true` if data found, `false` otherwise

Fetches name indices from feature parameters for "Stylistic Set" ('ssXX') or "Character Variant" ('cvXX') features.

Since: 2.0.0

## otLayoutFeatureWithVariationsGetLookups

otLayoutFeatureWithVariationsGetLookups Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> Word32 | `featureIndex`: The index of the feature to query
-> Word32 | `variationsIndex`: The index of the feature variation to query
-> Word32 | `startOffset`: offset of the first lookup to retrieve
-> m (Word32, [Word32]) | Returns: Total number of lookups.

Fetches a list of all lookups enumerated for the specified feature, in the specified face's GSUB table or GPOS table, enabled at the specified variations index. The list returned will begin at the offset provided.

Since: 1.4.0

## otLayoutGetAttachPoints

otLayoutGetAttachPoints Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: The `FaceT` to work on
-> Word32 | `glyph`: The `hb_codepoint_t` code point to query
-> Word32 | `startOffset`: offset of the first attachment point to retrieve
-> m (Word32, [Word32]) | Returns: Total number of attachment points for `glyph`.

Fetches a list of all attachment points for the specified glyph in the GDEF table of the face. The list returned will begin at the offset provided.

Useful if the client program wishes to cache the list.

## otLayoutGetBaseline

otLayoutGetBaseline Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: a font
-> OtLayoutBaselineTagT | `baselineTag`: a baseline tag
-> DirectionT | `direction`: text direction.
-> Word32 | `scriptTag`: script tag.
-> Word32 | `languageTag`: language tag, currently unused.
-> m (Int32, Int32) | Returns: `true` if found baseline value in the font.

Fetches a baseline value from the face.

Since: 2.6.0

## otLayoutGetBaseline2

otLayoutGetBaseline2 Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: a font
-> OtLayoutBaselineTagT | `baselineTag`: a baseline tag
-> DirectionT | `direction`: text direction.
-> ScriptT | `script`: script.
-> Maybe LanguageT | `language`: language, currently unused.
-> m (Int32, Int32) | Returns: `true` if found baseline value in the font.

Fetches a baseline value from the face.

This function is like `otLayoutGetBaseline` but takes `ScriptT` and `LanguageT` instead of OpenType `hb_tag_t`.

Since: 8.0.0

## otLayoutGetBaselineWithFallback

otLayoutGetBaselineWithFallback Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: a font
-> OtLayoutBaselineTagT | `baselineTag`: a baseline tag
-> DirectionT | `direction`: text direction.
-> Word32 | `scriptTag`: script tag.
-> Word32 | `languageTag`: language tag, currently unused.
-> m Int32 |

Fetches a baseline value from the face, and synthesizes it if the font does not have it.

Since: 4.0.0

## otLayoutGetBaselineWithFallback2

otLayoutGetBaselineWithFallback2 Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: a font
-> OtLayoutBaselineTagT | `baselineTag`: a baseline tag
-> DirectionT | `direction`: text direction.
-> ScriptT | `script`: script.
-> Maybe LanguageT | `language`: language, currently unused.
-> m Int32 |

Fetches a baseline value from the face, and synthesizes it if the font does not have it.

This function is like `otLayoutGetBaselineWithFallback` but takes `ScriptT` and `LanguageT` instead of OpenType `hb_tag_t`.

Since: 8.0.0

## otLayoutGetFontExtents

otLayoutGetFontExtents Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: a font
-> DirectionT | `direction`: text direction.
-> Word32 | `scriptTag`: script tag.
-> Word32 | `languageTag`: language tag.
-> m (Int32, Maybe FontExtentsT) | Returns: `true` if found script/language-specific font extents.

Fetches script/language-specific font extents. These values are looked up in the `BASE` table's `MinMax` records.

If no such extents are found, the default extents for the font are fetched. As such, the return value of this function can for the most part be ignored. Note that the per-script/language extents do not have a line-gap value, and the line-gap is set to zero in that case.

Since: 8.0.0

## otLayoutGetFontExtents2

otLayoutGetFontExtents2 Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: a font
-> DirectionT | `direction`: text direction.
-> ScriptT | `script`: script.
-> Maybe LanguageT | `language`: language.
-> m (Int32, Maybe FontExtentsT) | Returns: `true` if found script/language-specific font extents.

Fetches script/language-specific font extents. These values are looked up in the `BASE` table's `MinMax` records.

If no such extents are found, the default extents for the font are fetched. As such, the return value of this function can for the most part be ignored. Note that the per-script/language extents do not have a line-gap value, and the line-gap is set to zero in that case.

This function is like `otLayoutGetFontExtents` but takes `ScriptT` and `LanguageT` instead of OpenType `hb_tag_t`.

Since: 8.0.0

## otLayoutGetGlyphClass

otLayoutGetGlyphClass Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: The `FaceT` to work on
-> Word32 | `glyph`: The `hb_codepoint_t` code point to query
-> m OtLayoutGlyphClassT | Returns: The `OtLayoutGlyphClassT` glyph class of the given code point in the GDEF table of the face.

Fetches the GDEF class of the requested glyph in the specified face.

Since: 0.9.7

## otLayoutGetHorizontalBaselineTagForScript

otLayoutGetHorizontalBaselineTagForScript Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ScriptT | `script`: a script tag.
-> m OtLayoutBaselineTagT | Returns: dominant baseline tag for the `script`.

Fetches the dominant horizontal baseline tag used by `script`.

Since: 4.0.0

## otLayoutGetLigatureCarets

otLayoutGetLigatureCarets Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: The `FontT` to work on
-> DirectionT | `direction`: The `DirectionT` text direction to use
-> Word32 | `glyph`: The `hb_codepoint_t` code point to query
-> Word32 | `startOffset`: offset of the first caret position to retrieve
-> m (Word32, [Int32]) | Returns: Total number of ligature caret positions for `glyph`.

Fetches a list of the caret positions defined for a ligature glyph in the GDEF table of the font. The list returned will begin at the offset provided.

Note that a ligature that is formed from n characters will have n-1 caret positions. The first character is not represented in the array, since its caret position is the glyph position.

The positions returned by this function are 'unshaped', and will have to be fixed up for kerning that may be applied to the ligature glyph.

## otLayoutGetSizeParams

otLayoutGetSizeParams Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> m (Int32, Word32, Word32, Word32, Word32, Word32) | Returns: `true` if data found, `false` otherwise

Fetches optical-size feature data (i.e., the `size` feature from GPOS). Note that the subfamily_id and the subfamily name string (accessible via the subfamily_name_id) as used here are defined as pertaining only to fonts within a font family that differ specifically in their respective size ranges; other ways to differentiate fonts within a subfamily are not covered by the `size` feature.

For more information on this distinction, see the <http://developer.gnome.org/harfbuzz/stable/ https://docs.microsoft.com/en-us/typography/opentype/spec/features_pt#tag-size `size` feature documentation>.

Since: 0.9.10

## otLayoutHasGlyphClasses

otLayoutHasGlyphClasses Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> m Int32 | Returns: `true` if data found, `false` otherwise

Tests whether a face has any glyph classes defined in its GDEF table.

## otLayoutHasPositioning

otLayoutHasPositioning Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> m Int32 | Returns: `true` if the face has GPOS data, `false` otherwise

Tests whether the specified face includes any GPOS positioning.

## otLayoutHasSubstitution

otLayoutHasSubstitution Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> m Int32 | Returns: `true` if data found, `false` otherwise

Tests whether the specified face includes any GSUB substitutions.

Since: 0.6.0

## otLayoutLanguageFindFeature

otLayoutLanguageFindFeature Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> Word32 | `scriptIndex`: The index of the requested script tag
-> Word32 | `languageIndex`: The index of the requested language tag
-> Word32 | `featureTag`: `hb_tag_t` of the feature tag requested
-> m (Int32, Word32) | Returns: `true` if the feature is found, `false` otherwise

Fetches the index of a given feature tag in the specified face's GSUB table or GPOS table, underneath the specified script and language.

Since: 0.6.0

## otLayoutLanguageGetFeatureIndexes

otLayoutLanguageGetFeatureIndexes Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> Word32 | `scriptIndex`: The index of the requested script tag
-> Word32 | `languageIndex`: The index of the requested language tag
-> Word32 | `startOffset`: offset of the first feature tag to retrieve
-> m (Word32, [Word32]) | Returns: Total number of features.

Fetches a list of all features in the specified face's GSUB table or GPOS table, underneath the specified script and language. The list returned will begin at the offset provided.

Since: 0.6.0

## otLayoutLanguageGetFeatureTags

otLayoutLanguageGetFeatureTags Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> Word32 | `scriptIndex`: The index of the requested script tag
-> Word32 | `languageIndex`: The index of the requested language tag
-> Word32 | `startOffset`: offset of the first feature tag to retrieve
-> m (Word32, [Word32]) | Returns: Total number of feature tags.

Fetches a list of all features in the specified face's GSUB table or GPOS table, underneath the specified script and language. The list returned will begin at the offset provided.

Since: 0.6.0

## otLayoutLanguageGetRequiredFeature

otLayoutLanguageGetRequiredFeature Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> Word32 | `scriptIndex`: The index of the requested script tag
-> Word32 | `languageIndex`: The index of the requested language tag
-> m (Int32, Word32, Word32) | Returns: `true` if the feature is found, `false` otherwise

Fetches the tag of a requested feature index in the given face's GSUB or GPOS table, underneath the specified script and language.

Since: 0.9.30

## otLayoutLanguageGetRequiredFeatureIndex

otLayoutLanguageGetRequiredFeatureIndex Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> Word32 | `scriptIndex`: The index of the requested script tag
-> Word32 | `languageIndex`: The index of the requested language tag
-> m (Int32, Word32) | Returns: `true` if the feature is found, `false` otherwise

Fetches the index of a requested feature in the given face's GSUB or GPOS table, underneath the specified script and language.

Since: 0.6.0

## otLayoutLookupGetGlyphAlternates

otLayoutLookupGetGlyphAlternates Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: a face.
-> Word32 | `lookupIndex`: index of the feature lookup to query.
-> Word32 | `glyph`: a glyph id.
-> Word32 | `startOffset`: starting offset.
-> [Word32] | `alternateGlyphs`: A glyphs buffer. Alternate glyphs associated with the glyph id.
-> m (Word32, [Word32]) | Returns: Total number of alternates found in the specific lookup index for the given glyph id.

Fetches alternates of a glyph from a given GSUB lookup index. Note that for one-to-one GSUB glyph substitutions, this function fetches the substituted glyph.

Since: 2.6.8

## otLayoutLookupGetOpticalBound

otLayoutLookupGetOpticalBound Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: a font.
-> Word32 | `lookupIndex`: index of the feature lookup to query.
-> DirectionT | `direction`: edge of the glyph to query.
-> Word32 | `glyph`: a glyph id.
-> m Int32 | Returns: Adjustment value. Negative values mean the glyph will stick out of the margin.

Fetches the optical bound of a glyph positioned at the margin of text. The direction identifies which edge of the glyph to query.

Since: 5.3.0

## otLayoutLookupWouldSubstitute

otLayoutLookupWouldSubstitute Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `lookupIndex`: The index of the lookup to query
-> Word32 | `glyphs`: The sequence of glyphs to query for substitution
-> Word32 | `glyphsLength`: The length of the glyph sequence
-> Int32 | `zeroContext`: `hb_bool_t` indicating whether pre-/post-context are disallowed in substitutions
-> m Int32 | Returns: `true` if a substitution would be triggered, `false` otherwise

Tests whether a specified lookup in the specified face would trigger a substitution on the given glyph sequence.

Since: 0.9.7

## otLayoutScriptFindLanguage

otLayoutScriptFindLanguage Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> Word32 | `scriptIndex`: The index of the requested script tag
-> Word32 | `languageTag`: The `hb_tag_t` of the requested language
-> Word32 | `languageIndex`: The index of the requested language
-> m Int32 | Returns: `true` if the language tag is found, `false` otherwise

Deprecated: (Since version 2.0.0)

Fetches the index of a given language tag in the specified face's GSUB table or GPOS table, underneath the specified script tag.

Since: 0.6.0

## otLayoutScriptGetLanguageTags

otLayoutScriptGetLanguageTags Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> Word32 | `scriptIndex`: The index of the requested script tag
-> Word32 | `startOffset`: offset of the first language tag to retrieve
-> m (Word32, [Word32]) | Returns: Total number of language tags.

Fetches a list of language tags in the given face's GSUB or GPOS table, underneath the specified script index. The list returned will begin at the offset provided.

Since: 0.6.0

## otLayoutScriptSelectLanguage

otLayoutScriptSelectLanguage Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> Word32 | `scriptIndex`: The index of the requested script tag
-> Word32 | `languageCount`: The number of languages in the specified script
-> Word32 | `languageTags`: The array of language tags
-> m (Int32, Word32) | Returns: `true` if one of the given language tags is found, `false` otherwise

Fetches the index of the first language tag fom `languageTags` that is present in the specified face's GSUB or GPOS table, underneath the specified script index.

If none of the given language tags is found, `false` is returned and `languageIndex` is set to the default language index.

Since: 2.0.0

## otLayoutScriptSelectLanguage2

otLayoutScriptSelectLanguage2 Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> Word32 | `scriptIndex`: The index of the requested script tag
-> Word32 | `languageCount`: The number of languages in the specified script
-> Word32 | `languageTags`: The array of language tags
-> m (Int32, Word32, Word32) | Returns: `true` if one of the given language tags is found, `false` otherwise

Fetches the index of the first language tag fom `languageTags` that is present in the specified face's GSUB or GPOS table, underneath the specified script index.

If none of the given language tags is found, `false` is returned and `languageIndex` is set to `OT_LAYOUT_DEFAULT_LANGUAGE_INDEX` and `chosenLanguage` is set to `HB_TAG_NONE`.

Since: 7.0.0

## otLayoutTableChooseScript

otLayoutTableChooseScript Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> Word32 | `scriptTags`: Array of `hb_tag_t` script tags
-> m (Int32, Word32, Word32) |

Deprecated since 2.0.0

## otLayoutTableFindFeatureVariations

otLayoutTableFindFeatureVariations Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> Int32 | `coords`: The variation coordinates to query
-> Word32 | `numCoords`: The number of variation coordinates
-> m (Int32, Word32) | Returns: `true` if feature variations were found, `false` otherwise.

Fetches a list of feature variations in the specified face's GSUB table or GPOS table, at the specified variation coordinates.

Since: 1.4.0

## otLayoutTableFindScript

otLayoutTableFindScript Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> Word32 | `scriptTag`: `hb_tag_t` of the script tag requested
-> m (Int32, Word32) | Returns: `true` if the script is found, `false` otherwise

Fetches the index if a given script tag in the specified face's GSUB table or GPOS table.

## otLayoutTableGetFeatureTags

otLayoutTableGetFeatureTags Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> Word32 | `startOffset`: offset of the first feature tag to retrieve
-> m (Word32, [Word32]) | Returns: Total number of feature tags.

Fetches a list of all feature tags in the given face's GSUB or GPOS table. Note that there might be duplicate feature tags, belonging to different script/language-system pairs of the table.

Since: 0.6.0

## otLayoutTableGetLookupCount

otLayoutTableGetLookupCount Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> m Word32 | Returns: Total number of lookups.

Fetches the total number of lookups enumerated in the specified face's GSUB table or GPOS table.

Since: 0.9.22

## otLayoutTableGetScriptTags

otLayoutTableGetScriptTags Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> Word32 | `startOffset`: offset of the first script tag to retrieve
-> m (Word32, [Word32]) | Returns: Total number of script tags.

Fetches a list of all scripts enumerated in the specified face's GSUB table or GPOS table. The list returned will begin at the offset provided.

## otLayoutTableSelectScript

otLayoutTableSelectScript Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `tableTag`: `HB_OT_TAG_GSUB` or `HB_OT_TAG_GPOS`
-> Word32 | `scriptCount`: Number of script tags in the array
-> Word32 | `scriptTags`: Array of `hb_tag_t` script tags
-> m (Int32, Word32, Word32) | Returns: `true` if one of the requested scripts is selected, `false` if a fallback script is selected or if no scripts are selected.

Selects an OpenType script for `tableTag` from the `scriptTags` array.

If the table does not have any of the requested scripts, then `DFLT`, `dflt`, and `latn` tags are tried in that order. If the table still does not have any of these scripts, `scriptIndex` is set to `OT_LAYOUT_NO_SCRIPT_INDEX` and `chosenScript` is set to `HB_TAG_NONE`.

Since: 2.0.0

## otMathGetConstant

otMathGetConstant Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> OtMathConstantT | `constant`: `OtMathConstantT` the constant to retrieve
-> m Int32 | Returns: the requested constant or zero

Fetches the specified math constant. For most constants, the value returned is an `hb_position_t`.

However, if the requested constant is `HB_OT_MATH_CONSTANT_SCRIPT_PERCENT_SCALE_DOWN`, `HB_OT_MATH_CONSTANT_SCRIPT_SCRIPT_PERCENT_SCALE_DOWN` or `HB_OT_MATH_CONSTANT_RADICAL_DEGREE_BOTTOM_RAISE_PERCENT`, then the return value is an integer between 0 and 100 representing that percentage.

Since: 1.3.3

## otMathGetGlyphAssembly

otMathGetGlyphAssembly Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The index of the glyph to stretch
-> DirectionT | `direction`: direction of the stretching (horizontal or vertical)
-> Word32 | `startOffset`: offset of the first glyph part to retrieve
-> [OtMathGlyphPartT] | `parts`: the glyph parts returned
-> m (Word32, [OtMathGlyphPartT], Int32) | Returns: the total number of parts in the glyph assembly

Fetches the GlyphAssembly for the specified font, glyph index, and direction. Returned are a list of `OtMathGlyphPartT` glyph parts that can be used to draw the glyph and an italics-correction value (if one is defined in the font).

<note>The `direction` parameter is only used to select between horizontal or vertical directions for the construction. Even though all `DirectionT` values are accepted, only the result of `HB_DIRECTION_IS_HORIZONTAL` is considered.</note>

Since: 1.3.3

## otMathGetGlyphItalicsCorrection

otMathGetGlyphItalicsCorrection Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph index from which to retrieve the value
-> m Int32 | Returns: the italics correction of the glyph or zero

Fetches an italics-correction value (if one exists) for the specified glyph index.

Since: 1.3.3

## otMathGetGlyphKerning

otMathGetGlyphKerning Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph index from which to retrieve the value
-> OtMathKernT | `kern`: The `OtMathKernT` from which to retrieve the value
-> Int32 | `correctionHeight`: the correction height to use to determine the kerning.
-> m Int32 | Returns: requested kerning value or zero

Fetches the math kerning (cut-ins) value for the specified font, glyph index, and `kern`.

If the MathKern table is found, the function examines it to find a height value that is greater or equal to `correctionHeight`. If such a height value is found, corresponding kerning value from the table is returned. If no such height value is found, the last kerning value is returned.

Since: 1.3.3

## otMathGetGlyphKernings

otMathGetGlyphKernings Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph index from which to retrieve the kernings
-> OtMathKernT | `kern`: The `OtMathKernT` from which to retrieve the kernings
-> Word32 | `startOffset`: offset of the first kern entry to retrieve
-> [OtMathKernEntryT] | `kernEntries`: array of kern entries returned
-> m (Word32, [OtMathKernEntryT]) | Returns: the total number of kern values available or zero

Fetches the raw MathKern (cut-in) data for the specified font, glyph index, and `kern`. The corresponding list of kern values and correction heights is returned as a list of `OtMathKernEntryT` structs.

See also `hb_ot_math_get_glyph_kerning`, which handles selecting the appropriate kern value for a given correction height.

<note>For a glyph with `n` defined kern values (where `n` > 0), there are only `n`−1 defined correction heights, as each correction height defines a boundary past which the next kern value should be selected. Therefore, only the `OtMathKernEntryT`.`kern_value` of the uppermost `OtMathKernEntryT` actually comes from the font; its corresponding `OtMathKernEntryT`.`max_correction_height` is always set to <code>INT32_MAX</code>.</note>

Since: 3.4.0

## otMathGetGlyphTopAccentAttachment

otMathGetGlyphTopAccentAttachment Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The glyph index from which to retrieve the value
-> m Int32 | Returns: the top accent attachment of the glyph or 0.5 * the advance width of `glyph`

Fetches a top-accent-attachment value (if one exists) for the specified glyph index.

For any glyph that does not have a top-accent-attachment value - that is, a glyph not covered by the `MathTopAccentAttachment` table (or, when `font` has no `MathTopAccentAttachment` table or no `MATH` table, any glyph) - the function synthesizes a value, returning the position at one-half the glyph's advance width.

Since: 1.3.3

## otMathGetGlyphVariants

otMathGetGlyphVariants Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> Word32 | `glyph`: The index of the glyph to stretch
-> DirectionT | `direction`: The direction of the stretching (horizontal or vertical)
-> Word32 | `startOffset`: offset of the first variant to retrieve
-> [OtMathGlyphVariantT] | `variants`: array of variants returned
-> m (Word32, [OtMathGlyphVariantT]) | Returns: the total number of size variants available or zero

Fetches the MathGlyphConstruction for the specified font, glyph index, and direction. The corresponding list of size variants is returned as a list of `OtMathGlyphVariantT` structs.

<note>The `direction` parameter is only used to select between horizontal or vertical directions for the construction. Even though all `DirectionT` values are accepted, only the result of `HB_DIRECTION_IS_HORIZONTAL` is considered.</note>

Since: 1.3.3

## otMathGetMinConnectorOverlap

otMathGetMinConnectorOverlap Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: `FontT` to work upon
-> DirectionT | `direction`: direction of the stretching (horizontal or vertical)
-> m Int32 | Returns: requested minimum connector overlap or zero

Fetches the MathVariants table for the specified font and returns the minimum overlap of connecting glyphs that are required to draw a glyph assembly in the specified direction.

<note>The `direction` parameter is only used to select between horizontal or vertical directions for the construction. Even though all `DirectionT` values are accepted, only the result of `HB_DIRECTION_IS_HORIZONTAL` is considered.</note>

Since: 1.3.3

## otMathHasData

otMathHasData Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to test
-> m Int32 | Returns: `true` if the table is found, `false` otherwise

Tests whether a face has a `MATH` table.

Since: 1.3.3

## otMathIsGlyphExtendedShape

otMathIsGlyphExtendedShape Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `glyph`: The glyph index to test
-> m Int32 | Returns: `true` if the glyph is an extended shape, `false` otherwise

Tests whether the given glyph index is an extended shape in the face.

Since: 1.3.3

## otMetaGetEntryTags

otMetaGetEntryTags Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: a face object
-> Word32 | `startOffset`: iteration's start offset
-> [OtMetaTagT] | `entries`: entries tags buffer
-> m (Word32, [OtMetaTagT]) | Returns: Number of all available feature types.

Fetches all available feature types.

Since: 2.6.0

## otMetaReferenceEntry

otMetaReferenceEntry Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: a `FaceT` object.
-> OtMetaTagT | `metaTag`: tag of metadata you like to have.
-> m BlobT | Returns: A blob containing the blob.

It fetches metadata entry of a given tag from a font.

Since: 2.6.0

## otMetricsGetPosition

otMetricsGetPosition Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: an `FontT` object.
-> OtMetricsTagT | `metricsTag`: tag of metrics value you like to fetch.
-> m (Int32, Int32) | Returns: Whether found the requested metrics in the font.

Fetches metrics value corresponding to `metricsTag` from `font`.

Since: 2.6.0

## otMetricsGetPositionWithFallback

otMetricsGetPositionWithFallback Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: an `FontT` object.
-> OtMetricsTagT | `metricsTag`: tag of metrics value you like to fetch.
-> m Int32 |

Fetches metrics value corresponding to `metricsTag` from `font`, and synthesizes a value if it the value is missing in the font.

Since: 4.0.0

## otMetricsGetVariation

otMetricsGetVariation Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: an `FontT` object.
-> OtMetricsTagT | `metricsTag`: tag of metrics value you like to fetch.
-> m Float | Returns: The requested metric value.

Fetches metrics value corresponding to `metricsTag` from `font` with the current font variation settings applied.

Since: 2.6.0

## otMetricsGetXVariation

otMetricsGetXVariation Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: an `FontT` object.
-> OtMetricsTagT | `metricsTag`: tag of metrics value you like to fetch.
-> m Int32 | Returns: The requested metric value.

Fetches horizontal metrics value corresponding to `metricsTag` from `font` with the current font variation settings applied.

Since: 2.6.0

## otMetricsGetYVariation

otMetricsGetYVariation Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: an `FontT` object.
-> OtMetricsTagT | `metricsTag`: tag of metrics value you like to fetch.
-> m Int32 | Returns: The requested metric value.

Fetches vertical metrics value corresponding to `metricsTag` from `font` with the current font variation settings applied.

Since: 2.6.0

## otNameGetUtf16

otNameGetUtf16 Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: font face.
-> Word32 | `nameId`: OpenType name identifier to fetch.
-> LanguageT | `language`: language to fetch the name for.
-> [Word16] | `text`: buffer to write fetched name into.
-> m (Word32, [Word16]) | Returns: full length of the requested string, or 0 if not found.

Fetches a font name from the OpenType 'name' table. If `language` is `LANGUAGE_INVALID`, English ("en") is assumed. Returns string in UTF-16 encoding. A NUL terminator is always written for convenience, and isn't included in the output `textSize`.

Since: 2.1.0

## otNameGetUtf32

otNameGetUtf32 Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: font face.
-> Word32 | `nameId`: OpenType name identifier to fetch.
-> LanguageT | `language`: language to fetch the name for.
-> [Word32] | `text`: buffer to write fetched name into.
-> m (Word32, [Word32]) | Returns: full length of the requested string, or 0 if not found.

Fetches a font name from the OpenType 'name' table. If `language` is `LANGUAGE_INVALID`, English ("en") is assumed. Returns string in UTF-32 encoding. A NUL terminator is always written for convenience, and isn't included in the output `textSize`.

Since: 2.1.0

## otNameGetUtf8

otNameGetUtf8 Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: font face.
-> Word32 | `nameId`: OpenType name identifier to fetch.
-> LanguageT | `language`: language to fetch the name for.
-> [Text] | `text`: buffer to write fetched name into.
-> m (Word32, [Text]) | Returns: full length of the requested string, or 0 if not found.

Fetches a font name from the OpenType 'name' table. If `language` is `LANGUAGE_INVALID`, English ("en") is assumed. Returns string in UTF-8 encoding. A NUL terminator is always written for convenience, and isn't included in the output `textSize`.

Since: 2.1.0

## otNameListNames

otNameListNames Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: font face.
-> m [OtNameEntryT] | Returns: Array of available name entries.

Enumerates all available name IDs and language combinations. Returned array is owned by the `face` and should not be modified. It can be used as long as `face` is alive.

Since: 2.1.0

## otShapePlanGetFeatureTags

otShapePlanGetFeatureTags Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ShapePlanT | `shapePlan`: A shaping plan
-> Word32 | `startOffset`: The index of first feature to retrieve
-> m (Word32, [Word32]) | Returns: Total number of feature tagss.

Fetches the list of OpenType feature tags enabled for a shaping plan, if possible.

Since: 10.3.0

## otTagFromLanguage

otTagFromLanguage Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> LanguageT | `language`: an `LanguageT` to convert.
-> m Word32 |

Deprecated: (Since version 2.0.0)use `otTagsFromScriptAndLanguage` instead

Converts an `LanguageT` to an `hb_tag_t`.

Since: 0.6.0

## otTagToLanguage

otTagToLanguage Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Word32 | `tag`: an language tag
-> m (Maybe LanguageT) | Returns: The `LanguageT` corresponding to `tag`.

Converts a language tag to an `LanguageT`.

Since: 0.9.2

## otTagToScript

otTagToScript Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Word32 | `tag`: a script tag
-> m ScriptT | Returns: The `ScriptT` corresponding to `tag`.

Converts a script tag to an `ScriptT`.

## otTagsFromScript

otTagsFromScript Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ScriptT | `script`: an `ScriptT` to convert.
-> m (Word32, Word32) |

Deprecated: (Since version 2.0.0)use `otTagsFromScriptAndLanguage` instead

Converts an `ScriptT` to script tags.

Since: 0.6.0

## otTagsFromScriptAndLanguage

otTagsFromScriptAndLanguage Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ScriptT | `script`: an `ScriptT` to convert.
-> Maybe LanguageT | `language`: an `LanguageT` to convert.
-> Word32 | `scriptCount`: maximum number of script tags to retrieve (IN) and actual number of script tags retrieved (OUT)
-> Word32 | `languageCount`: maximum number of language tags to retrieve (IN) and actual number of language tags retrieved (OUT)
-> m (Word32, Word32, Word32, Word32) |

Converts an `ScriptT` and an `LanguageT` to script and language tags.

Since: 2.0.0

## otVarFindAxis

otVarFindAxis Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `axisTag`: The `hb_tag_t` of the variation axis to query
-> Word32 | `axisIndex`: The index of the variation axis
-> m (Int32, OtVarAxisT) |

Deprecated: (Since version 2.2.0)use `otVarFindAxisInfo` instead

Fetches the variation-axis information corresponding to the specified axis tag in the specified face.

Since: 1.4.2

## otVarFindAxisInfo

otVarFindAxisInfo Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `axisTag`: The `hb_tag_t` of the variation axis to query
-> m (Int32, OtVarAxisInfoT) | Returns: `true` if data found, `false` otherwise

Fetches the variation-axis information corresponding to the specified axis tag in the specified face.

Since: 2.2.0

## otVarGetAxes

otVarGetAxes Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `startOffset`: offset of the first lookup to retrieve
-> [OtVarAxisT] | `axesArray`: The array of variation axes found
-> m (Word32, [OtVarAxisT]) |

Deprecated: (Since version 2.2.0)use `otVarGetAxisInfos` instead

Fetches a list of all variation axes in the specified face. The list returned will begin at the offset provided.

Since: 1.4.2

## otVarGetAxisCount

otVarGetAxisCount Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: The `FaceT` to work on
-> m Word32 | Returns: the number of variation axes defined

Fetches the number of OpenType variation axes included in the face.

Since: 1.4.2

## otVarGetAxisInfos

otVarGetAxisInfos Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to work upon
-> Word32 | `startOffset`: offset of the first lookup to retrieve
-> [OtVarAxisInfoT] | `axesArray`: The array of variation axes found
-> m (Word32, [OtVarAxisInfoT]) | Returns: the number of variation axes in the face

Fetches a list of all variation axes in the specified face. The list returned will begin at the offset provided.

Since: 2.2.0

## otVarGetNamedInstanceCount

otVarGetNamedInstanceCount Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: The `FaceT` to work on
-> m Word32 | Returns: the number of named instances defined

Fetches the number of named instances included in the face.

Since: 2.2.0

## otVarHasData

otVarHasData Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: The `FaceT` to work on
-> m Int32 | Returns: `true` if data found, `false` otherwise

Tests whether a face includes any OpenType variation data in the `fvar` table.

Since: 1.4.2

## otVarNamedInstanceGetDesignCoords

otVarNamedInstanceGetDesignCoords Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: The `FaceT` to work on
-> Word32 | `instanceIndex`: The index of the named instance to query
-> m (Word32, [Float]) | Returns: the number of variation axes in the face

Fetches the design-space coordinates corresponding to the given named instance in the face.

Since: 2.2.0

## otVarNamedInstanceGetPostscriptNameId

otVarNamedInstanceGetPostscriptNameId Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: The `FaceT` to work on
-> Word32 | `instanceIndex`: The index of the named instance to query
-> m Word32 | Returns: the Name ID found for the PostScript name

Fetches the `name` table Name ID that provides display names for the "PostScript name" defined for the given named instance in the face.

Since: 2.2.0

## otVarNamedInstanceGetSubfamilyNameId

otVarNamedInstanceGetSubfamilyNameId Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: The `FaceT` to work on
-> Word32 | `instanceIndex`: The index of the named instance to query
-> m Word32 | Returns: the Name ID found for the Subfamily name

Fetches the `name` table Name ID that provides display names for the "Subfamily name" defined for the given named instance in the face.

Since: 2.2.0

## otVarNormalizeCoords

otVarNormalizeCoords Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: The `FaceT` to work on
-> Word32 | `coordsLength`: The length of the coordinate array
-> Float | `designCoords`: The design-space coordinates to normalize
-> m Int32 |

Normalizes the given design-space coordinates. The minimum and maximum values for the axis are mapped to the interval [-1,1], with the default axis value mapped to 0.

The normalized values have 14 bits of fixed-point sub-integer precision as per OpenType specification.

Any additional scaling defined in the face's `avar` table is also applied, as described at https://docs.microsoft.com/en-us/typography/opentype/spec/avar

Note: `coordsLength` must be the same as the number of axes in the face, as for example returned by `otVarGetAxisCount`. Otherwise, the behavior is undefined.

Since: 1.4.2

## otVarNormalizeVariations

otVarNormalizeVariations Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: The `FaceT` to work on
-> VariationT | `variations`: The array of variations to normalize
-> Word32 | `variationsLength`: The number of variations to normalize
-> m [Int32] |

Normalizes all of the coordinates in the given list of variation axes.

Since: 1.4.2

## paintColor

paintColor Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: paint functions
-> Ptr () | `paintData`: associated data passed by the caller
-> Int32 | `isForeground`: whether the color is the foreground
-> Word32 | `color`: The color to use
-> m () |

Perform a "color" paint operation.

Since: 7.0.0

## paintColorGlyph

paintColorGlyph Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: paint functions
-> Ptr () | `paintData`: associated data passed by the caller
-> Word32 | `glyph`: the glyph ID
-> FontT | `font`: the font
-> m Int32 |

Perform a "color-glyph" paint operation.

Since: 8.2.0

## paintCustomPaletteColor

paintCustomPaletteColor Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: paint functions
-> Ptr () | `paintData`: associated data passed by the caller
-> Word32 | `colorIndex`: color index
-> m (Int32, Word32) | Returns: `true` if found, `false` otherwise

Gets the custom palette color for `colorIndex`.

Since: 7.0.0

## paintFuncsCreate

paintFuncsCreate Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m PaintFuncsT | Returns: the paint-functions structure

Creates a new `PaintFuncsT` structure of paint functions.

The initial reference count of 1 should be released with `hb_paint_funcs_destroy()` when you are done using the `PaintFuncsT`. This function never returns `NULL`. If memory cannot be allocated, a special singleton `PaintFuncsT` object will be returned.

Since: 7.0.0

## paintFuncsGetEmpty

paintFuncsGetEmpty Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m PaintFuncsT | Returns: The empty paint-functions structure

Fetches the singleton empty paint-functions structure.

Since: 7.0.0

## paintFuncsIsImmutable

paintFuncsIsImmutable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: The paint-functions structure
-> m Int32 | Returns: `true` if `funcs` is immutable, `false` otherwise

Tests whether a paint-functions structure is immutable.

Since: 7.0.0

## paintFuncsMakeImmutable

paintFuncsMakeImmutable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: The paint-functions structure
-> m () |

Makes a paint-functions structure immutable.

After this call, all attempts to set one of the callbacks on `funcs` will fail.

Since: 7.0.0

## paintImage

paintImage Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: paint functions
-> Ptr () | `paintData`: associated data passed by the caller
-> BlobT | `image`: image data
-> Word32 | `width`: width of the raster image in pixels, or 0
-> Word32 | `height`: height of the raster image in pixels, or 0
-> Word32 | `format`: the image format as a tag
-> Float | `slant`: Deprecated. set to 0.0
-> Maybe GlyphExtentsT | `extents`: the extents of the glyph
-> m () |

Perform a "image" paint operation.

Since: 7.0.0

## paintLinearGradient

paintLinearGradient Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: paint functions
-> Ptr () | `paintData`: associated data passed by the caller
-> ColorLineT | `colorLine`: Color information for the gradient
-> Float | `x0`: X coordinate of the first point
-> Float | `y0`: Y coordinate of the first point
-> Float | `x1`: X coordinate of the second point
-> Float | `y1`: Y coordinate of the second point
-> Float | `x2`: X coordinate of the third point
-> Float | `y2`: Y coordinate of the third point
-> m () |

Perform a "linear-gradient" paint operation.

Since: 7.0.0

## paintPopClip

paintPopClip Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: paint functions
-> Ptr () | `paintData`: associated data passed by the caller
-> m () |

Perform a "pop-clip" paint operation.

Since: 7.0.0

## paintPopGroup

paintPopGroup Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: paint functions
-> Ptr () | `paintData`: associated data passed by the caller
-> PaintCompositeModeT | `mode`: the compositing mode to use
-> m () |

Perform a "pop-group" paint operation.

Since: 7.0.0

## paintPopTransform

paintPopTransform Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: paint functions
-> Ptr () | `paintData`: associated data passed by the caller
-> m () |

Perform a "pop-transform" paint operation.

Since: 7.0.0

## paintPushClipGlyph

paintPushClipGlyph Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: paint functions
-> Ptr () | `paintData`: associated data passed by the caller
-> Word32 | `glyph`: the glyph ID
-> FontT | `font`: the font
-> m () |

Perform a "push-clip-glyph" paint operation.

Since: 7.0.0

## paintPushClipRectangle

paintPushClipRectangle Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: paint functions
-> Ptr () | `paintData`: associated data passed by the caller
-> Float | `xmin`: min X for the rectangle
-> Float | `ymin`: min Y for the rectangle
-> Float | `xmax`: max X for the rectangle
-> Float | `ymax`: max Y for the rectangle
-> m () |

Perform a "push-clip-rect" paint operation.

Since: 7.0.0

## paintPushFontTransform

paintPushFontTransform Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: paint functions
-> Ptr () | `paintData`: associated data passed by the caller
-> FontT | `font`: a font
-> m () |

Push the transform reflecting the font's scale and slant settings onto the paint functions.

Since: 11.0.0

## paintPushGroup

paintPushGroup Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: paint functions
-> Ptr () | `paintData`: associated data passed by the caller
-> m () |

Perform a "push-group" paint operation.

Since: 7.0.0

## paintPushInverseFontTransform

paintPushInverseFontTransform Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: paint functions
-> Ptr () | `paintData`: associated data passed by the caller
-> FontT | `font`: a font
-> m () |

Push the inverse of the transform reflecting the font's scale and slant settings onto the paint functions.

Since: 11.0.0

## paintPushTransform

paintPushTransform Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: paint functions
-> Ptr () | `paintData`: associated data passed by the caller
-> Float | `xx`: xx component of the transform matrix
-> Float | `yx`: yx component of the transform matrix
-> Float | `xy`: xy component of the transform matrix
-> Float | `yy`: yy component of the transform matrix
-> Float | `dx`: dx component of the transform matrix
-> Float | `dy`: dy component of the transform matrix
-> m () |

Perform a "push-transform" paint operation.

Since: 7.0.0

## paintRadialGradient

paintRadialGradient Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: paint functions
-> Ptr () | `paintData`: associated data passed by the caller
-> ColorLineT | `colorLine`: Color information for the gradient
-> Float | `x0`: X coordinate of the first circle's center
-> Float | `y0`: Y coordinate of the first circle's center
-> Float | `r0`: radius of the first circle
-> Float | `x1`: X coordinate of the second circle's center
-> Float | `y1`: Y coordinate of the second circle's center
-> Float | `r1`: radius of the second circle
-> m () |

Perform a "radial-gradient" paint operation.

Since: 7.0.0

## paintSweepGradient

paintSweepGradient Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PaintFuncsT | `funcs`: paint functions
-> Ptr () | `paintData`: associated data passed by the caller
-> ColorLineT | `colorLine`: Color information for the gradient
-> Float | `x0`: X coordinate of the circle's center
-> Float | `y0`: Y coordinate of the circle's center
-> Float | `startAngle`: the start angle
-> Float | `endAngle`: the end angle
-> m () |

Perform a "sweep-gradient" paint operation.

Since: 7.0.0

## realloc

realloc Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Ptr () | `ptr`: The pointer to the memory to reallocate.
-> CSize | `size`: The new size of the memory.
-> m (Ptr ()) | Returns: A pointer to the reallocated memory.

Reallocates the memory pointed to by `ptr` to `size` bytes, using the allocator set at compile-time. Typically just `realloc()`.

Since: 11.0.0

## scriptFromIso15924Tag

scriptFromIso15924Tag Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Word32 | `tag`: an `hb_tag_t` representing an ISO 15924 tag.
-> m ScriptT | Returns: An `ScriptT` corresponding to the ISO 15924 tag.

Converts an ISO 15924 script tag to a corresponding `ScriptT`.

Since: 0.9.2

## scriptFromString

scriptFromString Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ByteString | `str`: a string representing an ISO 15924 tag.
-> m ScriptT | Returns: An `ScriptT` corresponding to the ISO 15924 tag.

Converts a string `str` representing an ISO 15924 script tag to a corresponding `ScriptT`. Shorthand for `tagFromString` then `scriptFromIso15924Tag`.

Since: 0.9.2

## scriptGetHorizontalDirection

scriptGetHorizontalDirection Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ScriptT | `script`: The `ScriptT` to query
-> m DirectionT | Returns: The horizontal `DirectionT` of `script`

Fetches the `DirectionT` of a script when it is set horizontally. All right-to-left scripts will return `HB_DIRECTION_RTL`. All left-to-right scripts will return `HB_DIRECTION_LTR`.

Scripts that can be written either right-to-left or left-to-right will return `HB_DIRECTION_INVALID`.

Unknown scripts will return `HB_DIRECTION_LTR`.

Since: 0.9.2

## scriptToIso15924Tag

scriptToIso15924Tag Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ScriptT | `script`: an `ScriptT` to convert.
-> m Word32 | Returns: An `hb_tag_t` representing an ISO 15924 script tag.

Converts an `ScriptT` to a corresponding ISO 15924 script tag.

Since: 0.9.2

## segmentPropertiesEqual

segmentPropertiesEqual Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SegmentPropertiesT | `a`: first `SegmentPropertiesT` to compare.
-> SegmentPropertiesT | `b`: second `SegmentPropertiesT` to compare.
-> m Int32 | Returns: `true` if all properties of `a` equal those of `b`, `false` otherwise.

Checks the equality of two `SegmentPropertiesT`'s.

Since: 0.9.7

## segmentPropertiesHash

segmentPropertiesHash Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SegmentPropertiesT | `p`: `SegmentPropertiesT` to hash.
-> m Word32 | Returns: A hash of `p`.

Creates a hash representing `p`.

Since: 0.9.7

## segmentPropertiesOverlay

segmentPropertiesOverlay Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SegmentPropertiesT | `p`: `SegmentPropertiesT` to fill in.
-> SegmentPropertiesT | `src`: `SegmentPropertiesT` to fill in from.
-> m () |

Fills in missing fields of `p` from `src` in a considered manner.

First, if `p` does not have direction set, direction is copied from `src`.

Next, if `p` and `src` have the same direction (which can be unset), if `p` does not have script set, script is copied from `src`.

Finally, if `p` and `src` have the same direction and script (which either can be unset), if `p` does not have language set, language is copied from `src`.

Since: 3.3.0

## setAdd

setAdd Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> Word32 | `codepoint`: The element to add to `set`
-> m () |

Adds `codepoint` to `set`.

Since: 0.9.2

## setAddRange

setAddRange Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> Word32 | `first`: The first element to add to `set`
-> Word32 | `last`: The final element to add to `set`
-> m () |

Adds all of the elements from `first` to `last` (inclusive) to `set`.

Since: 0.9.7

## setAddSortedArray

setAddSortedArray Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> [Word32] | `sortedCodepoints`: Array of codepoints to add
-> m () |

Adds `numCodepoints` codepoints to a set at once. The codepoints array must be in increasing order, with size at least `numCodepoints`.

Since: 4.1.0

## setAllocationSuccessful

setAllocationSuccessful Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> m Int32 | Returns: `true` if allocation succeeded, `false` otherwise

Tests whether memory allocation for a set was successful.

Since: 0.9.2

## setClear

setClear Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> m () |

Clears out the contents of a set.

Since: 0.9.2

## setCopy

setCopy Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> m SetT | Returns: Newly-allocated set.

Allocate a copy of `set`.

Since: 2.8.2

## setCreate

setCreate Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m SetT | Returns: The new `SetT`

Creates a new, initially empty set.

Since: 0.9.2

## setDel

setDel Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> Word32 | `codepoint`: Removes `codepoint` from `set`
-> m () |

Removes `codepoint` from `set`.

Since: 0.9.2

## setDelRange

setDelRange Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> Word32 | `first`: The first element to remove from `set`
-> Word32 | `last`: The final element to remove from `set`
-> m () |

Removes all of the elements from `first` to `last` (inclusive) from `set`.

If `last` is `HB_SET_VALUE_INVALID`, then all values greater than or equal to `first` are removed.

Since: 0.9.7

## setGetEmpty

setGetEmpty Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m SetT | Returns: The empty `SetT`

Fetches the singleton empty `SetT`.

Since: 0.9.2

## setGetMax

setGetMax Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> m Word32 | Returns: maximum of `set`, or `HB_SET_VALUE_INVALID` if `set` is empty.

Finds the largest element in the set.

Since: 0.9.7

## setGetMin

setGetMin Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> m Word32 | Returns: minimum of `set`, or `HB_SET_VALUE_INVALID` if `set` is empty.

Finds the smallest element in the set.

Since: 0.9.7

## setGetPopulation

setGetPopulation Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> m Word32 | Returns: The population of `set`

Returns the number of elements in the set.

Since: 0.9.7

## setHas

setHas Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> Word32 | `codepoint`: The element to query
-> m Int32 | Returns: `true` if `codepoint` is in `set`, `false` otherwise

Tests whether `codepoint` belongs to `set`.

Since: 0.9.2

## setHash

setHash Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> m Word32 | Returns: A hash of `set`.

Creates a hash representing `set`.

Since: 4.4.0

## setIntersect

setIntersect Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> SetT | `other`: Another set
-> m () |

Makes `set` the intersection of `set` and `other`.

Since: 0.9.2

## setInvert

setInvert Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> m () |

Inverts the contents of `set`.

Since: 3.0.0

## setIsEmpty

setIsEmpty Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: a set.
-> m Int32 | Returns: `true` if `set` is empty

Tests whether a set is empty (contains no elements).

Since: 0.9.7

## setIsEqual

setIsEqual Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> SetT | `other`: Another set
-> m Int32 | Returns: `true` if the two sets are equal, `false` otherwise.

Tests whether `set` and `other` are equal (contain the same elements).

Since: 0.9.7

## setIsInverted

setIsInverted Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> m Int32 | Returns: `true` if the set is inverted, `false` otherwise

Returns whether the set is inverted.

Since: 7.0.0

## setIsSubset

setIsSubset Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> SetT | `largerSet`: Another set
-> m Int32 | Returns: `true` if the `set` is a subset of (or equal to) `largerSet`, `false` otherwise.

Tests whether `set` is a subset of `largerSet`.

Since: 1.8.1

## setNext

setNext Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> Word32 | `codepoint`: Input = Code point to query Output = Code point retrieved
-> m (Int32, Word32) | Returns: `true` if there was a next value, `false` otherwise

Fetches the next element in `set` that is greater than current value of `codepoint`.

Set `codepoint` to `HB_SET_VALUE_INVALID` to get started.

Since: 0.9.2

## setNextMany

setNextMany Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> Word32 | `codepoint`: Outputting codepoints starting after this one. Use `HB_SET_VALUE_INVALID` to get started.
-> [Word32] | `out`: An array of codepoints to write to.
-> m Word32 | Returns: the number of values written.

Finds the next element in `set` that is greater than `codepoint`. Writes out codepoints to `out`, until either the set runs out of elements, or `size` codepoints are written, whichever comes first.

Since: 4.2.0

## setNextRange

setNextRange Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> Word32 | `last`: Input = The current last code point in the range Output = The last code point in the range
-> m (Int32, Word32, Word32) | Returns: `true` if there was a next range, `false` otherwise

Fetches the next consecutive range of elements in `set` that are greater than current value of `last`.

Set `last` to `HB_SET_VALUE_INVALID` to get started.

Since: 0.9.7

## setPrevious

setPrevious Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> Word32 | `codepoint`: Input = Code point to query Output = Code point retrieved
-> m (Int32, Word32) | Returns: `true` if there was a previous value, `false` otherwise

Fetches the previous element in `set` that is lower than current value of `codepoint`.

Set `codepoint` to `HB_SET_VALUE_INVALID` to get started.

Since: 1.8.0

## setPreviousRange

setPreviousRange Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> Word32 | `first`: Input = The current first code point in the range Output = The first code point in the range
-> m (Int32, Word32, Word32) | Returns: `true` if there was a previous range, `false` otherwise

Fetches the previous consecutive range of elements in `set` that are greater than current value of `last`.

Set `first` to `HB_SET_VALUE_INVALID` to get started.

Since: 1.8.0

## setSet

setSet Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> SetT | `other`: Another set
-> m () |

Makes the contents of `set` equal to the contents of `other`.

Since: 0.9.2

## setSubtract

setSubtract Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> SetT | `other`: Another set
-> m () |

Subtracts the contents of `other` from `set`.

Since: 0.9.2

## setSymmetricDifference

setSymmetricDifference Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> SetT | `other`: Another set
-> m () |

Makes `set` the symmetric difference of `set` and `other`.

Since: 0.9.2

## setUnion

setUnion Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> SetT | `set`: A set
-> SetT | `other`: Another set
-> m () |

Makes `set` the union of `set` and `other`.

Since: 0.9.2

## shape

shape Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: an `FontT` to use for shaping
-> BufferT | `buffer`: an `BufferT` to shape
-> Maybe [FeatureT] | `features`: an array of user specified `FeatureT` or `NULL`
-> m () |

Shapes `buffer` using `font` turning its Unicode characters content to positioned glyphs. If `features` is not `NULL`, it will be used to control the features applied during shaping. If two `features` have the same tag but overlapping ranges the value of the feature with the higher index takes precedence.

Since: 0.9.2

## shapeFull

shapeFull Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: an `FontT` to use for shaping
-> BufferT | `buffer`: an `BufferT` to shape
-> Maybe [FeatureT] | `features`: an array of user specified `FeatureT` or `NULL`
-> Maybe [Text] | `shaperList`: a `NULL`-terminated array of shapers to use or `NULL`
-> m Int32 | Returns: false if all shapers failed, true otherwise

See `shape` for details. If `shaperList` is not `NULL`, the specified shapers will be used in the given order, otherwise the default shapers list will be used.

Since: 0.9.2

## shapeListShapers

shapeListShapers Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m [Text] | Returns: a `NULL`-terminated array of supported shapers constant string. The returned array is owned by HarfBuzz and should not be modified or freed.

Retrieves the list of shapers supported by HarfBuzz.

Since: 0.9.2

## shapePlanCreate

shapePlanCreate Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to use
-> SegmentPropertiesT | `props`: The `SegmentPropertiesT` of the segment
-> [FeatureT] | `userFeatures`: The list of user-selected features
-> [Text] | `shaperList`: List of shapers to try
-> m ShapePlanT | Returns: The shaping plan

Constructs a shaping plan for a combination of `face`, `userFeatures`, `props`, and `shaperList`.

Since: 0.9.7

## shapePlanCreate2

shapePlanCreate2 Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to use
-> SegmentPropertiesT | `props`: The `SegmentPropertiesT` of the segment
-> [FeatureT] | `userFeatures`: The list of user-selected features
-> [Int32] | `coords`: The list of variation-space coordinates
-> [Text] | `shaperList`: List of shapers to try
-> m ShapePlanT | Returns: The shaping plan

The variable-font version of `hb_shape_plan_create`. Constructs a shaping plan for a combination of `face`, `userFeatures`, `props`, and `shaperList`, plus the variation-space coordinates `coords`.

Since: 1.4.0

## shapePlanCreateCached

shapePlanCreateCached Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to use
-> SegmentPropertiesT | `props`: The `SegmentPropertiesT` of the segment
-> [FeatureT] | `userFeatures`: The list of user-selected features
-> [Text] | `shaperList`: List of shapers to try
-> m ShapePlanT | Returns: The shaping plan

Creates a cached shaping plan suitable for reuse, for a combination of `face`, `userFeatures`, `props`, and `shaperList`.

Since: 0.9.7

## shapePlanCreateCached2

shapePlanCreateCached2 Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FaceT | `face`: `FaceT` to use
-> SegmentPropertiesT | `props`: The `SegmentPropertiesT` of the segment
-> [FeatureT] | `userFeatures`: The list of user-selected features
-> [Int32] | `coords`: The list of variation-space coordinates
-> [Text] | `shaperList`: List of shapers to try
-> m ShapePlanT | Returns: The shaping plan

The variable-font version of `hb_shape_plan_create_cached`. Creates a cached shaping plan suitable for reuse, for a combination of `face`, `userFeatures`, `props`, and `shaperList`, plus the variation-space coordinates `coords`.

Since: 1.4.0

## shapePlanExecute

shapePlanExecute Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ShapePlanT | `shapePlan`: A shaping plan
-> FontT | `font`: The `FontT` to use
-> BufferT | `buffer`: The `BufferT` to work upon
-> [FeatureT] | `features`: Features to enable
-> m Int32 | Returns: `true` if success, `false` otherwise.

Executes the given shaping plan on the specified buffer, using the given `font` and `features`.

Since: 0.9.7

## shapePlanGetEmpty

shapePlanGetEmpty Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m ShapePlanT | Returns: The empty shaping plan

Fetches the singleton empty shaping plan.

Since: 0.9.7

## shapePlanGetShaper

shapePlanGetShaper Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ShapePlanT | `shapePlan`: A shaping plan
-> m Text | Returns: The shaper

Fetches the shaper from a given shaping plan.

Since: 0.9.7

## styleGetValue

styleGetValue Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FontT | `font`: a `FontT` object.
-> StyleTagT | `styleTag`: a style tag.
-> m Float | Returns: Corresponding axis or default value to a style tag.

Searches variation axes of a `FontT` object for a specific axis first, if not set, first tries to get default style values in `STAT` table then tries to polyfill from different tables of the font.

Since: 3.0.0

## tagFromString

tagFromString Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ByteString | `str`: String to convert
-> m Word32 | Returns: The `hb_tag_t` corresponding to `str`

Converts a string into an `hb_tag_t`. Valid tags are four characters. Shorter input strings will be padded with spaces. Longer input strings will be truncated.

Since: 0.9.2

## unicodeCombiningClass

unicodeCombiningClass Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnicodeFuncsT | `ufuncs`: The Unicode-functions structure
-> Word32 | `unicode`: The code point to query
-> m UnicodeCombiningClassT | Returns: The `UnicodeCombiningClassT` of `unicode`

Retrieves the Canonical Combining Class (ccc) property of code point `unicode`.

Since: 0.9.2

## unicodeCompose

unicodeCompose Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnicodeFuncsT | `ufuncs`: The Unicode-functions structure
-> Word32 | `a`: The first Unicode code point to compose
-> Word32 | `b`: The second Unicode code point to compose
-> m (Int32, Word32) | Returns: `true` if `a` and `b` composed, `false` otherwise

Fetches the composition of a sequence of two Unicode code points.

Calls the composition function of the specified Unicode-functions structure `ufuncs`.

Since: 0.9.2

## unicodeDecompose

unicodeDecompose Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnicodeFuncsT | `ufuncs`: The Unicode-functions structure
-> Word32 | `ab`: Unicode code point to decompose
-> m (Int32, Word32, Word32) | Returns: `true` if `ab` was decomposed, `false` otherwise

Fetches the decomposition of a Unicode code point.

Calls the decomposition function of the specified Unicode-functions structure `ufuncs`.

Since: 0.9.2

## unicodeDecomposeCompatibility

unicodeDecomposeCompatibility Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnicodeFuncsT | `ufuncs`: The Unicode-functions structure
-> Word32 | `u`: Code point to decompose
-> m (Word32, Word32) | Returns: length of `decomposed`.

Deprecated: (Since version 2.0.0)

Fetches the compatibility decomposition of a Unicode code point. Deprecated.

Since: 0.9.2

## unicodeEastasianWidth

unicodeEastasianWidth Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnicodeFuncsT | `ufuncs`: a Unicode-function structure
-> Word32 | `unicode`: The code point to query
-> m Word32 |

Deprecated: (Since version 2.0.0)

Don't use. Not used by HarfBuzz.

Since: 0.9.2

## unicodeFuncsCreate

unicodeFuncsCreate Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Maybe UnicodeFuncsT | `parent`: Parent Unicode-functions structure
-> m UnicodeFuncsT | Returns: The Unicode-functions structure

Creates a new `UnicodeFuncsT` structure of Unicode functions.

Since: 0.9.2

## unicodeFuncsGetDefault

unicodeFuncsGetDefault Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m UnicodeFuncsT | Returns: a pointer to the `UnicodeFuncsT` Unicode-functions structure

Fetches a pointer to the default Unicode-functions structure that is used when no functions are explicitly set on `BufferT`.

Since: 0.9.2

## unicodeFuncsGetEmpty

unicodeFuncsGetEmpty Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m UnicodeFuncsT | Returns: The empty Unicode-functions structure

Fetches the singleton empty Unicode-functions structure.

Since: 0.9.2

## unicodeFuncsGetParent

unicodeFuncsGetParent Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnicodeFuncsT | `ufuncs`: The Unicode-functions structure
-> m UnicodeFuncsT | Returns: The parent Unicode-functions structure

Fetches the parent of the Unicode-functions structure `ufuncs`.

Since: 0.9.2

## unicodeFuncsIsImmutable

unicodeFuncsIsImmutable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnicodeFuncsT | `ufuncs`: The Unicode-functions structure
-> m Int32 | Returns: `true` if `ufuncs` is immutable, `false` otherwise

Tests whether the specified Unicode-functions structure is immutable.

Since: 0.9.2

## unicodeFuncsMakeImmutable

unicodeFuncsMakeImmutable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnicodeFuncsT | `ufuncs`: The Unicode-functions structure
-> m () |

Makes the specified Unicode-functions structure immutable.

Since: 0.9.2

## unicodeGeneralCategory

unicodeGeneralCategory Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnicodeFuncsT | `ufuncs`: The Unicode-functions structure
-> Word32 | `unicode`: The code point to query
-> m UnicodeGeneralCategoryT | Returns: The `UnicodeGeneralCategoryT` of `unicode`

Retrieves the General Category (gc) property of code point `unicode`.

Since: 0.9.2

## unicodeMirroring

unicodeMirroring Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnicodeFuncsT | `ufuncs`: The Unicode-functions structure
-> Word32 | `unicode`: The code point to query
-> m Word32 | Returns: The `hb_codepoint_t` of the Mirroring Glyph for `unicode`

Retrieves the Bi-directional Mirroring Glyph code point defined for code point `unicode`.

Since: 0.9.2

## unicodeScript

unicodeScript Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnicodeFuncsT | `ufuncs`: The Unicode-functions structure
-> Word32 | `unicode`: The code point to query
-> m ScriptT | Returns: The `ScriptT` of `unicode`

Retrieves the `ScriptT` script to which code point `unicode` belongs.

Since: 0.9.2

## variationFromString

variationFromString Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ByteString | `str`: a string to parse
-> m (Int32, VariationT) | Returns: `true` if `str` is successfully parsed, `false` otherwise

Parses a string into a `VariationT`.

The format for specifying variation settings follows. All valid CSS font-variation-settings values other than 'normal' and 'inherited' are also accepted, though, not documented below.

The format is a tag, optionally followed by an equals sign, followed by a number. For example `wght=500`, or `slnt=-7.5`.

Since: 1.4.2

## variationToString

variationToString Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> VariationT | `variation`: an `VariationT` to convert
-> [Text] | `buf`: output string
-> m [Text] |

Converts an `VariationT` into a `NULL`-terminated string in the format understood by `variationFromString`. The client in responsible for allocating big enough size for `buf`, 128 bytes is more than enough.

Note that the string won't include any whitespace.

Since: 1.4.2