carbon/webfonts
Composer 安装命令:
composer require carbon/webfonts
包简介
Webfonts for Neos
README 文档
README
This package provides different web fonts for you Neos project. Used by Litefyr and Carbon.Newsletter
Installation
Add the package in your site package:
composer require --no-update carbon/webfonts
Then run composer update in your project root.
Add your own fonts
If you want to add your own custom font, you can add your entry under the settings key
Neos.Neos.Ui.frontendConfiguration.CarbonWebfonts:
Neos: Neos: Ui: frontendConfiguration: CarbonWebfonts: "My Custom Font Name": # If fontWeight is an array, it has multiple fonts, if it is a number it is a fixed font weight (e.g. 400) # if it is a string, it is a range of font weights (e.g. "100 900") fontWeight: [400, 700] # Group can be 'Sans Serif', Serif, Handwriting, Display or Monospace group: "Sans Serif" # The fallback is automatically done by the group name, but if you want to override it, you can set it here fallback: "Helvetica, sans-serif" # If your font is a webfont, please add a css-file with all declartions in it. It has to be in the public folder cssFile: resource://Vendor.Package/Fonts/MyCustomFontName.css
This setting can also be added on a per property basis:
Vendor.Package:Mixin.FontFamily: properties: type: string ui: inspector: editor: "Carbon.Webfonts/FontFamily" editorOptions: allowEmpty: true # Allow system fonts allowSystemFonts: true # Allow fonts who need a font file allowFontFace: true # Set this to an object just like a font value to use a placeholder font # It takes the same values as a font value, but adding the needed name placeholderFont: name: "Open Sans" fallback: "Helvetica, Arial, sans-serif" # A path to a CSS file with @font-face declarations. # Can be a resource:// or a http(s):// path cssFile: false # This disables the fonts from this package useCarbonWebfonts: false # If set to false, only the font name is stored in the database enableFallback: true fonts: Alumni Sans: # Sets properties for showing in the editor preview. Does not affect saved value. # defaults to fontWeight: 400 and fontStyle: normal display: fontWeight: 500 fontStyle: italic group: Sans Serif cssFile: resource://Vendor.Package/Fonts/Alumni-Sans.css fontWeight: 100 900 fallback: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji' Atkinson Hyperlegible: group: Sans Serif cssFile: resource://Vendor.Package/Fonts/Atkinson-Hyperlegible.css fontWeight: - 400 - 700 fallback: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji' Impact: group: Sans Serif fontWeight: 400 fallback: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji'
carbon/webfonts 适用场景与选型建议
carbon/webfonts 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 2.77k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 12 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 carbon/webfonts 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 carbon/webfonts 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.77k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 19
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2024-12-17