It's not *necessary* to use the `tech(...)` syntax in order to load a COLRv1 font (any more than it is *necessary* to provide `format(...)`). If the `colr_v1` pref is enabled, such a font can be used by simply giving its name, e.g.
```
@font-face {
font-family: "MyCOLRv1Font";
src: url("MyCOLRv1Font.otf");
}
```
or
```
var f = new FontFace("MyFamilyName", "url(colorfont.otf)");
document.fonts.add(f);
```
The `tech(...)` syntax *can* be used to determine whether a given technology (e.g. COLRv1) is supported, so that the author can provide suitable fallbacks depending on what the browser supports. This applies equally to the `src` descriptor in a `@font-face` rule or the source parameter to the `FontFace` constructor, just like `format(...)`.
So an author could do something like:
```
@font-face {
font-family: "MyCOLRv1Font";
src: url("MyFallbackFont.otf");
src: url("MyCOLRv1Font.otf") tech(color-COLRv1),
url("MySVGOTfont.ttf") tech(color-SVG),
url("MyCOLRv0Font.ttf") tech(color-COLRv0),
url("MyBitmapfont.ttf") tech(color-CBDT),
url("MyFallbackFont.otf");
}
```
to load a fallback if the `tech()` syntax is not supported, but for browsers that do understand `tech()`, choose among several different resources depending on the rendering capabilities available.
Bug 1740530 Comment 37 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
It's not *necessary* to use the `tech(...)` syntax in order to load a COLRv1 font (any more than it is *necessary* to provide `format(...)`). If the `colr_v1` pref is enabled, such a font can be used by simply giving its name, e.g.
```
@font-face {
font-family: "MyCOLRv1Font";
src: url("MyCOLRv1Font.otf");
}
```
or
```
var f = new FontFace("MyFamilyName", "url(colorfont.otf)");
document.fonts.add(f);
```
The `tech(...)` syntax *can* be used to determine whether a given technology (e.g. COLRv1) is supported, so that the author can provide suitable fallbacks depending on what the browser supports. This applies equally to the `src` descriptor in a `@font-face` rule or the source parameter to the `FontFace` constructor, just like `format(...)`.
So an author could do something like:
```
@font-face {
font-family: "MyFancyFont";
src: url("MyFallbackFont.otf");
src: url("MyCOLRv1Font.otf") tech(color-COLRv1),
url("MySVGOTfont.ttf") tech(color-SVG),
url("MyCOLRv0Font.ttf") tech(color-COLRv0),
url("MyBitmapfont.ttf") tech(color-CBDT),
url("MyFallbackFont.otf");
}
```
to load a fallback if the `tech()` syntax is not supported, but for browsers that do understand `tech()`, choose among several different resources depending on the rendering capabilities available.