// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package designcompose.definition.element;
import "definition/element/variable.proto";
option java_multiple_files = true;
option java_package = "com.android.designcompose.definition.element";
option optimize_for = LITE_RUNTIME;
// FontWeight specifies the visual thickness of a typeface. It's represented
// numerically, usually ranging from 100 (thin) to 900 (black). Common values
// include 400 (regular), 500 (medium), and 700 (bold).
message FontWeight {
NumOrVar weight = 1;
}
// Allows italic or oblique faces to be selected.
enum FontStyle {
FONT_STYLE_UNSPECIFIED = 0;
// A face that is neither italic not obliqued.
FONT_STYLE_NORMAL = 1;
// A form that is generally cursive in nature.
FONT_STYLE_ITALIC = 2;
// A typically-sloped version of the regular face.
FONT_STYLE_OBLIQUE = 3;
}
// Allows underline or strikethrough to be selected.
enum TextDecoration {
TEXT_DECORATION_UNSPECIFIED = 0;
TEXT_DECORATION_NONE = 1;
TEXT_DECORATION_UNDERLINE = 2;
TEXT_DECORATION_STRIKETHROUGH = 3;
}
// The width of a font as an approximate fraction of the normal width.
// Widths range from 0.5 to 2.0 inclusive, with 1.0 as the normal width.
message FontStretch {
float value = 1;
}
// FontFeature refers to specific typographic settings within a typeface, such
// as ligatures (e.g., "fi" becoming a single glyph) or small capitals. These
// features can enhance the visual appearance and readability of text, providing
// additional stylistic options for designers.
message FontFeature {
string tag = 1;
bool enabled = 2;
}
// Initially only support url. No nodeId hyperlink support.
message Hyperlink {
string value = 1;
}