| // Copyright 2023 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // Top level component for a hermetic font server. The manifest and the component |
| // are named after the old fonts.cml which was based on config-data. |
| { |
| include: [ "inspect/offer.shard.cml" ], |
| children: [ |
| { |
| name: "asset-provider", |
| url: "fuchsia-pkg://fuchsia.com/asset-provider#meta/asset-provider.cm", |
| }, |
| { |
| name: "font-server", |
| url: "fuchsia-pkg://fuchsia.com/font-server#meta/font-server.cm", |
| }, |
| ], |
| offer: [ |
| { |
| from: "parent", |
| to: "#font-server", |
| config: [ |
| "fuchsia.fonts.FontManifest", |
| "fuchsia.fonts.VerboseLogging", |
| ], |
| }, |
| { |
| protocol: "fuchsia.tracing.provider.Registry", |
| from: "parent", |
| to: "#font-server", |
| |
| // Tracing is not available in bringup or non-eng builds, so must |
| // be optional. |
| availability: "optional", |
| }, |
| { |
| // Logging. |
| protocol: [ "fuchsia.logger.LogSink" ], |
| from: "parent", |
| to: [ |
| "#asset-provider", |
| "#font-server", |
| ], |
| }, |
| { |
| protocol: [ "fuchsia.pkg.FontResolver" ], |
| from: "parent", |
| to: "#font-server", |
| availability: "optional", |
| }, |
| { |
| directory: "config-data", |
| from: "parent", |
| to: "#font-server", |
| rights: [ "r*" ], |
| |
| // TODO(https://fxbug.dev/42080737): Remove once config-data is not needed. |
| availability: "optional", |
| }, |
| |
| // Provide the resource directory from asset provider to font server. |
| { |
| directory: "fonts-data", |
| from: "#asset-provider", |
| to: "#font-server", |
| }, |
| ], |
| expose: [ |
| { |
| protocol: [ |
| "fuchsia.fonts.experimental.Provider", |
| "fuchsia.fonts.Provider", |
| ], |
| from: "#font-server", |
| }, |
| ], |
| } |