Skip to content

Commit

Permalink
Support font provider in composition layer (#2439)
Browse files Browse the repository at this point in the history
  • Loading branch information
1an-xu authored Jun 20, 2024
1 parent fca6f33 commit f5ee923
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ final class PreCompositionLayer: CompositionLayer {
asset: PrecompAsset,
layerImageProvider: LayerImageProvider,
layerTextProvider: LayerTextProvider,
layerFontProvider: LayerFontProvider,
textProvider: AnimationKeypathTextProvider,
fontProvider: AnimationFontProvider,
assetLibrary: AssetLibrary?,
Expand All @@ -38,6 +39,7 @@ final class PreCompositionLayer: CompositionLayer {
assetLibrary: assetLibrary,
layerImageProvider: layerImageProvider,
layerTextProvider: layerTextProvider,
layerFontProvider: layerFontProvider,
textProvider: textProvider,
fontProvider: fontProvider,
frameRate: frameRate,
Expand Down Expand Up @@ -77,6 +79,7 @@ final class PreCompositionLayer: CompositionLayer {

layerImageProvider.addImageLayers(imageLayers)
layerTextProvider.addTextLayers(textLayers)
layerFontProvider.addTextLayers(textLayers)
}

override init(layer: Any) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ final class MainThreadAnimationLayer: CALayer, RootAnimationLayer {
assetLibrary: animation.assetLibrary,
layerImageProvider: layerImageProvider,
layerTextProvider: layerTextProvider,
layerFontProvider: layerFontProvider,
textProvider: textProvider,
fontProvider: fontProvider,
frameRate: CGFloat(animation.framerate),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ extension [LayerModel] {
assetLibrary: AssetLibrary?,
layerImageProvider: LayerImageProvider,
layerTextProvider: LayerTextProvider,
layerFontProvider: LayerFontProvider,
textProvider: AnimationKeypathTextProvider,
fontProvider: AnimationFontProvider,
frameRate: CGFloat,
Expand Down Expand Up @@ -49,6 +50,7 @@ extension [LayerModel] {
asset: precompAsset,
layerImageProvider: layerImageProvider,
layerTextProvider: layerTextProvider,
layerFontProvider: layerFontProvider,
textProvider: textProvider,
fontProvider: fontProvider,
assetLibrary: assetLibrary,
Expand Down

0 comments on commit f5ee923

Please sign in to comment.