pax_global_header00006660000000000000000000000064152144703420014514gustar00rootroot0000000000000052 comment=5fa093254984c1fe609518636bd8c4d8331d2b97 googlefonts-gf-metadata-5fa0932/000077500000000000000000000000001521447034200165455ustar00rootroot00000000000000googlefonts-gf-metadata-5fa0932/.github/000077500000000000000000000000001521447034200201055ustar00rootroot00000000000000googlefonts-gf-metadata-5fa0932/.github/workflows/000077500000000000000000000000001521447034200221425ustar00rootroot00000000000000googlefonts-gf-metadata-5fa0932/.github/workflows/test-publish-release.yaml000066400000000000000000000152751521447034200271010ustar00rootroot00000000000000name: Test, publish, release on: - push - pull_request env: PROTOBUF_VERSION: "33.0" jobs: ensure-protos-up-to-date: name: Ensure Protos Are Up To Date # Go no further if this job fails. runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: recursive - uses: dtolnay/rust-toolchain@stable - name: Install Protoc run: | wget https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOBUF_VERSION/protoc-$PROTOBUF_VERSION-linux-x86_64.zip sudo unzip protoc-$PROTOBUF_VERSION-linux-x86_64.zip -d /usr/local rm protoc-$PROTOBUF_VERSION-linux-x86_64.zip - name: Run proto generation script run: sh resources/scripts/protoc.sh - name: Check for changes run: | if [ -n "$(git status --porcelain)" ]; then echo "Protos are not up to date. Please run the proto generation script."; git status exit 1; else echo "Protos are up to date."; fi rust-test: name: Rust Tests runs-on: ubuntu-latest needs: ensure-protos-up-to-date steps: - uses: actions/checkout@v4 with: submodules: recursive - uses: dtolnay/rust-toolchain@stable name: Set up Rust for caching - name: Build run: cargo build - name: Run tests run: | cargo test --verbose --workspace rust-formatting: runs-on: ubuntu-latest needs: ensure-protos-up-to-date steps: - uses: actions/checkout@v4 with: submodules: recursive - uses: dtolnay/rust-toolchain@stable name: Set up Rust for caching with: components: rustfmt - name: Lint for formatting run: cargo fmt --all -- --check rust-lint: name: Lint for warnings runs-on: ubuntu-latest needs: ensure-protos-up-to-date steps: - uses: actions/checkout@v4 with: submodules: recursive - uses: dtolnay/rust-toolchain@stable name: Set up Rust for caching with: components: clippy - name: Lint for warnings run: cargo clippy --all-targets --all-features -- -D warnings python-test: name: Python Tests needs: ensure-protos-up-to-date runs-on: ${{ matrix.platform }} strategy: fail-fast: false matrix: python-version: ["3.10", "3.12", "3.13", "3.14"] platform: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4 with: submodules: recursive fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages run: | pip install '.' # Run tests here when we have some. For now just check we import OK - name: Test import run: | python -c "import gfmetadata" python-black: needs: ensure-protos-up-to-date name: Python Black runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: recursive - name: Set up Python 3.14 uses: actions/setup-python@v5 with: python-version: 3.14 - name: Install packages run: | pip install black - name: Check formatting with Black run: | black --check . --exclude '_pb2.py$' create-github-release: if: contains(github.ref, 'refs/tags/v') name: Create GitHub Release needs: - python-test - python-black - rust-test - rust-lint - rust-formatting runs-on: ubuntu-latest permissions: contents: write id-token: write env: GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v4 with: submodules: recursive - name: Get release notes id: release_notes run: | # By default, GH Actions checkout will only fetch a single commit. # For us to extract the release notes, we need to fetch the tags # and tag annotations as well. # https://github.com/actions/checkout/issues/290 git fetch --tags --force TAG_NAME=${GITHUB_REF/refs\/tags\//} echo "$(git tag -l --format='%(contents)' $TAG_NAME)" > "${{ runner.temp }}/CHANGELOG.md" - name: Create GitHub release if needed id: create_release run: | if ! gh release view ${GITHUB_REF_NAME}; then git show -s --format=%B ${GITHUB_REF_NAME} | tail -n +4 | gh release create ${GITHUB_REF_NAME} -t ${GITHUB_REF_NAME} -F - fi publish-rust: runs-on: ubuntu-latest if: contains(github.ref, 'refs/tags/v') needs: create-github-release name: Publish Rust crate steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable - run: cargo publish ${{ env.CARGO_PUBLISH_ARGS }} --no-verify env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} package-python: name: Build Python distribution runs-on: ubuntu-latest permissions: contents: write needs: - create-github-release steps: - uses: actions/checkout@v4 with: submodules: recursive fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.x' - name: Install release dependencies run: | python -m pip install --upgrade pip pip install --upgrade setuptools wheel build - name: Build a binary wheel and a source tarball run: python3 -m build - name: Store the distribution packages uses: actions/upload-artifact@v4 with: name: python-package-distributions path: dist/ publish-python: name: >- Publish Python 🐍 distribution 📦 to PyPI if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes needs: - package-python runs-on: ubuntu-latest environment: name: pypi url: https://pypi.org/p/gfmetadata/ permissions: id-token: write # IMPORTANT: mandatory for trusted publishing steps: - name: Download all the dists uses: actions/download-artifact@v4 with: name: python-package-distributions path: dist/ - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: # repository-url: https://test.pypi.org/legacy/ # for testing purposes verify-metadata: false # twine previously didn't verify metadata when uploading googlefonts-gf-metadata-5fa0932/.gitignore000066400000000000000000000011511521447034200205330ustar00rootroot00000000000000# Generated by Cargo # will have compiled files and executables debug/ target/ # These are backup files generated by rustfmt **/*.rs.bk # MSVC Windows builds of rustc generate these, which store debugging information *.pdb # RustRover # JetBrains specific template is maintained in a separate JetBrains.gitignore that can # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ Cargo.lockgooglefonts-gf-metadata-5fa0932/Cargo.toml000066400000000000000000000005231521447034200204750ustar00rootroot00000000000000[package] name = "gf-metadata" version = "0.2.5" edition = "2024" license = "Apache-2.0" description = "A metadata reader for Google Fonts." repository = "https://github.com/googlefonts/gf-metadata" readme = "README.md" categories = [] [dependencies] protobuf = "3.7.2" regex = "1.11.1" walkdir = "2.5.0" google-fonts-languages = "0.7.7" googlefonts-gf-metadata-5fa0932/LICENSE000066400000000000000000000261351521447034200175610ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] 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. googlefonts-gf-metadata-5fa0932/Lib/000077500000000000000000000000001521447034200172535ustar00rootroot00000000000000googlefonts-gf-metadata-5fa0932/Lib/gfmetadata/000077500000000000000000000000001521447034200213505ustar00rootroot00000000000000googlefonts-gf-metadata-5fa0932/Lib/gfmetadata/__init__.py000066400000000000000000000025541521447034200234670ustar00rootroot00000000000000# Re-export all the things for convenience from gfmetadata.axes_pb2 import AxisProto, FallbackProto from gfmetadata.designers_pb2 import DesignerInfoProto, AvatarProto from gfmetadata.fonts_public_pb2 import ( AxisSegmentProto, FamilyFallbackProto, FamilyProto, FontProto, GlyphGroupProto, SampleTextProto as FamilySampleTextProto, SourceFileProto, SourceProto, TargetProto, TargetTypeProto, ) from gfmetadata.knowledge_pb2 import ( ContributorsProto, KnowledgeProto, LessonProto, ModuleProto, TermProto, TopicProto, ) from gfmetadata.languages_public_pb2 import ( ExemplarCharsProto, LanguageProto, RegionProto, SampleTextProto, ScriptProto, ) # Re-export so users get the same protobuf version from google.protobuf import text_format __all__ = [ "AxisProto", "FallbackProto", "DesignerInfoProto", "AvatarProto", "AxisSegmentProto", "FamilyFallbackProto", "FamilyProto", "FontProto", "GlyphGroupProto", "FamilySampleTextProto", "SourceFileProto", "SourceProto", "TargetProto", "TargetTypeProto", "ContributorsProto", "KnowledgeProto", "LessonProto", "ModuleProto", "TermProto", "TopicProto", "ExemplarCharsProto", "LanguageProto", "RegionProto", "SampleTextProto", "ScriptProto", "text_format", ] googlefonts-gf-metadata-5fa0932/Lib/gfmetadata/axes_pb2.py000066400000000000000000000035021521447034200234250ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: axes.proto # Protobuf Python Version: 6.33.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, 33, 0, '', 'axes.proto' ) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\naxes.proto\"\xe6\x01\n\tAxisProto\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x07 \x01(\t\x12\x11\n\tmin_value\x18\x02 \x01(\x02\x12\x15\n\rdefault_value\x18\x03 \x01(\x02\x12\x11\n\tmax_value\x18\x04 \x01(\x02\x12\x11\n\tprecision\x18\x05 \x01(\x05\x12 \n\x08\x66\x61llback\x18\x06 \x03(\x0b\x32\x0e.FallbackProto\x12\x13\n\x0b\x64\x65scription\x18\x08 \x01(\t\x12\x15\n\rfallback_only\x18\t \x01(\x08\x12\x18\n\x10illustration_url\x18\n \x01(\t\"B\n\rFallbackProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'axes_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: DESCRIPTOR._loaded_options = None _globals['_AXISPROTO']._serialized_start=15 _globals['_AXISPROTO']._serialized_end=245 _globals['_FALLBACKPROTO']._serialized_start=247 _globals['_FALLBACKPROTO']._serialized_end=313 # @@protoc_insertion_point(module_scope) googlefonts-gf-metadata-5fa0932/Lib/gfmetadata/designers_pb2.py000066400000000000000000000030011521447034200244420ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: designers.proto # Protobuf Python Version: 6.33.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, 33, 0, '', 'designers.proto' ) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0f\x64\x65signers.proto\"Q\n\x11\x44\x65signerInfoProto\x12\x10\n\x08\x64\x65signer\x18\x01 \x01(\t\x12\x0c\n\x04link\x18\x02 \x01(\t\x12\x1c\n\x06\x61vatar\x18\x03 \x01(\x0b\x32\x0c.AvatarProto\" \n\x0b\x41vatarProto\x12\x11\n\tfile_name\x18\x01 \x01(\t') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'designers_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: DESCRIPTOR._loaded_options = None _globals['_DESIGNERINFOPROTO']._serialized_start=19 _globals['_DESIGNERINFOPROTO']._serialized_end=100 _globals['_AVATARPROTO']._serialized_start=102 _globals['_AVATARPROTO']._serialized_end=134 # @@protoc_insertion_point(module_scope) googlefonts-gf-metadata-5fa0932/Lib/gfmetadata/fonts_public_pb2.py000066400000000000000000000151621521447034200251610ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: fonts_public.proto # Protobuf Python Version: 6.33.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, 33, 0, '', 'fonts_public.proto' ) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12\x66onts_public.proto\x12\x13google.fonts_public\"\xc4\x07\n\x0b\x46\x61milyProto\x12\x0c\n\x04name\x18\x01 \x02(\t\x12\x10\n\x08\x64\x65signer\x18\x02 \x02(\t\x12\x0f\n\x07license\x18\x03 \x02(\t\x12\x10\n\x08\x63\x61tegory\x18\x04 \x03(\t\x12\x12\n\ndate_added\x18\x05 \x02(\t\x12-\n\x05\x66onts\x18\x06 \x03(\x0b\x32\x1e.google.fonts_public.FontProto\x12\x0f\n\x07\x61liases\x18\x07 \x03(\t\x12\x0f\n\x07subsets\x18\x08 \x03(\t\x12\x19\n\x11ttf_autohint_args\x18\t \x01(\t\x12\x33\n\x04\x61xes\x18\n \x03(\x0b\x32%.google.fonts_public.AxisSegmentProto\x12\x62\n\x1aregistry_default_overrides\x18\x0b \x03(\x0b\x32>.google.fonts_public.FamilyProto.RegistryDefaultOverridesEntry\x12\x30\n\x06source\x18\x0c \x01(\x0b\x32 .google.fonts_public.SourceProto\x12\x0f\n\x07is_noto\x18\r \x01(\x08\x12\x11\n\tlanguages\x18\x0e \x03(\t\x12;\n\tfallbacks\x18\x0f \x03(\x0b\x32(.google.fonts_public.FamilyFallbackProto\x12I\n\rsample_glyphs\x18\x10 \x03(\x0b\x32\x32.google.fonts_public.FamilyProto.SampleGlyphsEntry\x12\x39\n\x0bsample_text\x18\x11 \x01(\x0b\x32$.google.fonts_public.SampleTextProto\x12\x14\n\x0c\x64isplay_name\x18\x12 \x01(\t\x12\x43\n\x15ordered_sample_glyphs\x18\x13 \x03(\x0b\x32$.google.fonts_public.GlyphGroupProto\x12\x14\n\x0cminisite_url\x18\x14 \x01(\t\x12\x16\n\x0eprimary_script\x18\x15 \x01(\t\x12\x18\n\x10primary_language\x18\x16 \x01(\t\x12\x0e\n\x06stroke\x18\x17 \x01(\t\x12\x17\n\x0f\x63lassifications\x18\x19 \x03(\t\x1a?\n\x1dRegistryDefaultOverridesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x1a\x33\n\x11SampleGlyphsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8a\x01\n\tFontProto\x12\x0c\n\x04name\x18\x01 \x02(\t\x12\r\n\x05style\x18\x02 \x02(\t\x12\x0e\n\x06weight\x18\x03 \x02(\x05\x12\x10\n\x08\x66ilename\x18\x04 \x02(\t\x12\x18\n\x10post_script_name\x18\x05 \x02(\t\x12\x11\n\tfull_name\x18\x06 \x02(\t\x12\x11\n\tcopyright\x18\x07 \x01(\t\"Z\n\x10\x41xisSegmentProto\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x11\n\tmin_value\x18\x02 \x01(\x02\x12\x11\n\tmax_value\x18\x04 \x01(\x02J\x04\x08\x03\x10\x04R\rdefault_value\"\xa4\x01\n\x0bSourceProto\x12\x16\n\x0erepository_url\x18\x01 \x01(\t\x12\x0e\n\x06\x62ranch\x18\x05 \x01(\t\x12\x0e\n\x06\x63ommit\x18\x02 \x01(\t\x12\x13\n\x0b\x61rchive_url\x18\x03 \x01(\t\x12\x13\n\x0b\x63onfig_yaml\x18\x06 \x01(\t\x12\x33\n\x05\x66iles\x18\x04 \x03(\x0b\x32$.google.fonts_public.SourceFileProto\"9\n\x0fSourceFileProto\x12\x13\n\x0bsource_file\x18\x01 \x01(\t\x12\x11\n\tdest_file\x18\x02 \x01(\t\"H\n\x0bTargetProto\x12\x39\n\x0btarget_type\x18\x01 \x01(\x0e\x32$.google.fonts_public.TargetTypeProto\"\xcc\x01\n\x13\x46\x61milyFallbackProto\x12:\n\x0b\x61xis_target\x18\x01 \x03(\x0b\x32%.google.fonts_public.AxisSegmentProto\x12\x30\n\x06target\x18\x02 \x03(\x0b\x32 .google.fonts_public.TargetProto\x12\x17\n\x0fsize_adjust_pct\x18\x03 \x01(\x02\x12\x1b\n\x13\x61scent_override_pct\x18\x05 \x01(\x02\x12\x11\n\tlocal_src\x18\x04 \x03(\t\"\x92\x02\n\x0fSampleTextProto\x12\x15\n\rmasthead_full\x18\x01 \x01(\t\x12\x18\n\x10masthead_partial\x18\x02 \x01(\t\x12\x0e\n\x06styles\x18\x03 \x01(\t\x12\x0e\n\x06tester\x18\x04 \x01(\t\x12\x11\n\tposter_sm\x18\x05 \x01(\t\x12\x11\n\tposter_md\x18\x06 \x01(\t\x12\x11\n\tposter_lg\x18\x07 \x01(\t\x12\x13\n\x0bspecimen_48\x18\x08 \x01(\t\x12\x13\n\x0bspecimen_36\x18\t \x01(\t\x12\x13\n\x0bspecimen_32\x18\n \x01(\t\x12\x13\n\x0bspecimen_21\x18\x0b \x01(\t\x12\x13\n\x0bspecimen_16\x18\x0c \x01(\t\x12\x0c\n\x04note\x18\r \x01(\t\"/\n\x0fGlyphGroupProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06glyphs\x18\x02 \x01(\t*\x92\x01\n\x0fTargetTypeProto\x12\x16\n\x12TARGET_UNSPECIFIED\x10\x00\x12\x15\n\x11TARGET_OS_WINDOWS\x10\x01\x12\x11\n\rTARGET_OS_MAC\x10\x02\x12\x13\n\x0fTARGET_OS_LINUX\x10\x03\x12\x15\n\x11TARGET_OS_ANDROID\x10\x04\x12\x11\n\rTARGET_OS_IOS\x10\x05\x42%\n\x16\x63om.google.fonts.protoB\x0b\x46ontsPublic') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'fonts_public_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.google.fonts.protoB\013FontsPublic' _globals['_FAMILYPROTO_REGISTRYDEFAULTOVERRIDESENTRY']._loaded_options = None _globals['_FAMILYPROTO_REGISTRYDEFAULTOVERRIDESENTRY']._serialized_options = b'8\001' _globals['_FAMILYPROTO_SAMPLEGLYPHSENTRY']._loaded_options = None _globals['_FAMILYPROTO_SAMPLEGLYPHSENTRY']._serialized_options = b'8\001' _globals['_TARGETTYPEPROTO']._serialized_start=2077 _globals['_TARGETTYPEPROTO']._serialized_end=2223 _globals['_FAMILYPROTO']._serialized_start=44 _globals['_FAMILYPROTO']._serialized_end=1008 _globals['_FAMILYPROTO_REGISTRYDEFAULTOVERRIDESENTRY']._serialized_start=892 _globals['_FAMILYPROTO_REGISTRYDEFAULTOVERRIDESENTRY']._serialized_end=955 _globals['_FAMILYPROTO_SAMPLEGLYPHSENTRY']._serialized_start=957 _globals['_FAMILYPROTO_SAMPLEGLYPHSENTRY']._serialized_end=1008 _globals['_FONTPROTO']._serialized_start=1011 _globals['_FONTPROTO']._serialized_end=1149 _globals['_AXISSEGMENTPROTO']._serialized_start=1151 _globals['_AXISSEGMENTPROTO']._serialized_end=1241 _globals['_SOURCEPROTO']._serialized_start=1244 _globals['_SOURCEPROTO']._serialized_end=1408 _globals['_SOURCEFILEPROTO']._serialized_start=1410 _globals['_SOURCEFILEPROTO']._serialized_end=1467 _globals['_TARGETPROTO']._serialized_start=1469 _globals['_TARGETPROTO']._serialized_end=1541 _globals['_FAMILYFALLBACKPROTO']._serialized_start=1544 _globals['_FAMILYFALLBACKPROTO']._serialized_end=1748 _globals['_SAMPLETEXTPROTO']._serialized_start=1751 _globals['_SAMPLETEXTPROTO']._serialized_end=2025 _globals['_GLYPHGROUPPROTO']._serialized_start=2027 _globals['_GLYPHGROUPPROTO']._serialized_end=2074 # @@protoc_insertion_point(module_scope) googlefonts-gf-metadata-5fa0932/Lib/gfmetadata/knowledge_pb2.py000066400000000000000000000061721521447034200244520ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: knowledge.proto # Protobuf Python Version: 6.33.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, 33, 0, '', 'knowledge.proto' ) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0fknowledge.proto\x12\x05\x66onts\"!\n\x0eKnowledgeProto\x12\x0f\n\x07modules\x18\x01 \x03(\t\"N\n\x0bModuleProto\x12\x0f\n\x07\x61lt_ids\x18\x01 \x03(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0f\n\x07\x65xcerpt\x18\x03 \x01(\t\x12\x0f\n\x07lessons\x18\x04 \x03(\t\"+\n\nTopicProto\x12\x0f\n\x07\x61lt_ids\x18\x01 \x03(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\xd2\x01\n\x0bLessonProto\x12\x0f\n\x07\x61lt_ids\x18\x01 \x03(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0f\n\x07\x61uthors\x18\x03 \x03(\t\x12\x11\n\treviewers\x18\x04 \x03(\t\x12\x0e\n\x06topics\x18\x05 \x03(\t\x12\x14\n\x0cprev_lessons\x18\x06 \x03(\t\x12\x14\n\x0cnext_lessons\x18\x07 \x03(\t\x12\x15\n\rrelated_terms\x18\x08 \x03(\t\x12\x0f\n\x07\x65xcerpt\x18\t \x01(\t\x12\x1c\n\x14related_content_urls\x18\n \x03(\t\"r\n\tTermProto\x12\x0f\n\x07\x61lt_ids\x18\x01 \x03(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0f\n\x07\x65xcerpt\x18\x03 \x01(\t\x12\x17\n\x0frelated_lessons\x18\x04 \x03(\t\x12\x1c\n\x14related_content_urls\x18\x05 \x03(\t\"\x8d\x01\n\x11\x43ontributorsProto\x12?\n\x0c\x63ontributors\x18\x01 \x03(\x0b\x32).fonts.ContributorsProto.ContributorProto\x1a\x37\n\x10\x43ontributorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rpersonal_site\x18\x02 \x01(\tB#\n\x16\x63om.google.fonts.protoB\tKnowledge') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'knowledge_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\n\026com.google.fonts.protoB\tKnowledge' _globals['_KNOWLEDGEPROTO']._serialized_start=26 _globals['_KNOWLEDGEPROTO']._serialized_end=59 _globals['_MODULEPROTO']._serialized_start=61 _globals['_MODULEPROTO']._serialized_end=139 _globals['_TOPICPROTO']._serialized_start=141 _globals['_TOPICPROTO']._serialized_end=184 _globals['_LESSONPROTO']._serialized_start=187 _globals['_LESSONPROTO']._serialized_end=397 _globals['_TERMPROTO']._serialized_start=399 _globals['_TERMPROTO']._serialized_end=513 _globals['_CONTRIBUTORSPROTO']._serialized_start=516 _globals['_CONTRIBUTORSPROTO']._serialized_end=657 _globals['_CONTRIBUTORSPROTO_CONTRIBUTORPROTO']._serialized_start=602 _globals['_CONTRIBUTORSPROTO_CONTRIBUTORPROTO']._serialized_end=657 # @@protoc_insertion_point(module_scope) googlefonts-gf-metadata-5fa0932/Lib/gfmetadata/languages_public_pb2.py000066400000000000000000000066741521447034200260060ustar00rootroot00000000000000# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: languages_public.proto # Protobuf Python Version: 6.33.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, 33, 0, '', 'languages_public.proto' ) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16languages_public.proto\x12\x17google.languages_public\"Q\n\x0bRegionProto\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x12\n\npopulation\x18\x03 \x01(\x05\x12\x14\n\x0cregion_group\x18\x04 \x03(\t\"o\n\x0bScriptProto\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x12\n\nhistorical\x18\x03 \x01(\x08\x12\x11\n\tfictional\x18\x04 \x01(\x08\x12\x0e\n\x06\x66\x61mily\x18\x05 \x01(\t\x12\x0f\n\x07summary\x18\x06 \x01(\t\"\xce\x02\n\rLanguageProto\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08language\x18\x02 \x01(\t\x12\x0e\n\x06script\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x16\n\x0epreferred_name\x18\x05 \x01(\t\x12\x0f\n\x07\x61utonym\x18\x06 \x01(\t\x12\x12\n\npopulation\x18\x07 \x01(\x05\x12\x0e\n\x06region\x18\x08 \x03(\t\x12\x43\n\x0e\x65xemplar_chars\x18\t \x01(\x0b\x32+.google.languages_public.ExemplarCharsProto\x12=\n\x0bsample_text\x18\n \x01(\x0b\x32(.google.languages_public.SampleTextProto\x12\x12\n\nhistorical\x18\x0b \x01(\x08\x12\x0e\n\x06source\x18\x0c \x03(\t\x12\x0c\n\x04note\x18\r \x01(\t\"\x90\x01\n\x12\x45xemplarCharsProto\x12\x0c\n\x04\x62\x61se\x18\x01 \x01(\t\x12\x11\n\tauxiliary\x18\x02 \x01(\t\x12\r\n\x05marks\x18\x03 \x01(\t\x12\x10\n\x08numerals\x18\x04 \x01(\t\x12\x13\n\x0bpunctuation\x18\x05 \x01(\t\x12\r\n\x05index\x18\x06 \x01(\t\x12\x14\n\x0cnot_required\x18\x07 \x01(\t\"\x92\x02\n\x0fSampleTextProto\x12\x15\n\rmasthead_full\x18\x01 \x01(\t\x12\x18\n\x10masthead_partial\x18\x02 \x01(\t\x12\x0e\n\x06styles\x18\x03 \x01(\t\x12\x0e\n\x06tester\x18\x04 \x01(\t\x12\x11\n\tposter_sm\x18\x05 \x01(\t\x12\x11\n\tposter_md\x18\x06 \x01(\t\x12\x11\n\tposter_lg\x18\x07 \x01(\t\x12\x13\n\x0bspecimen_48\x18\x08 \x01(\t\x12\x13\n\x0bspecimen_36\x18\t \x01(\t\x12\x13\n\x0bspecimen_32\x18\n \x01(\t\x12\x13\n\x0bspecimen_21\x18\x0b \x01(\t\x12\x13\n\x0bspecimen_16\x18\x0c \x01(\t\x12\x0c\n\x04note\x18\r \x01(\t') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'languages_public_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: DESCRIPTOR._loaded_options = None _globals['_REGIONPROTO']._serialized_start=51 _globals['_REGIONPROTO']._serialized_end=132 _globals['_SCRIPTPROTO']._serialized_start=134 _globals['_SCRIPTPROTO']._serialized_end=245 _globals['_LANGUAGEPROTO']._serialized_start=248 _globals['_LANGUAGEPROTO']._serialized_end=582 _globals['_EXEMPLARCHARSPROTO']._serialized_start=585 _globals['_EXEMPLARCHARSPROTO']._serialized_end=729 _globals['_SAMPLETEXTPROTO']._serialized_start=732 _globals['_SAMPLETEXTPROTO']._serialized_end=1006 # @@protoc_insertion_point(module_scope) googlefonts-gf-metadata-5fa0932/README.md000066400000000000000000000004341521447034200200250ustar00rootroot00000000000000# Google Fonts Metadata Utilities This crate provides: * Helpers for reading metadata from a local copy of the Google Fonts repository. * Access to Protobuf definitions for families, languages, axes and designers. * Structured access to the tags and categories used in Google Fonts.googlefonts-gf-metadata-5fa0932/pyproject.toml000066400000000000000000000011251521447034200214600ustar00rootroot00000000000000[build-system] requires = [ "setuptools>=45", "setuptools_scm[toml]>=6.2" ] build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] where = ["Lib"] [tool.setuptools_scm] git_describe_command = "git describe --match 'v*' --tags" write_to = "Lib/gfmetadata/_version.py" [project] dynamic = ["version"] name = "gfmetadata" description = "A python API for interacting with Google Fonts protobuf definitions" requires-python = ">=3.8" readme = "README.md" authors = [ { name = "Simon Cozens", email = "simon@simon-cozens.org" } ] dependencies = [ "protobuf>=6.33.0", ] googlefonts-gf-metadata-5fa0932/resources/000077500000000000000000000000001521447034200205575ustar00rootroot00000000000000googlefonts-gf-metadata-5fa0932/resources/protos/000077500000000000000000000000001521447034200221055ustar00rootroot00000000000000googlefonts-gf-metadata-5fa0932/resources/protos/axes.proto000066400000000000000000000023131521447034200241310ustar00rootroot00000000000000syntax = "proto2"; // GF Axis Registry Protos // An axis in the GF Axis Registry message AxisProto { // Axis tag optional string tag = 1; // Display name for axis, e.g. "Optical size" for 'opsz' // Like 'Name' in // https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxistag_opsz optional string display_name = 7; // Lower bound for the axis optional float min_value = 2; // The default position to use and to prefer for exemplars optional float default_value = 3; // Upper bound for the axis optional float max_value = 4; // Input values for this axis must aligned to 10^precision optional int32 precision = 5; // Fallback positions along the axis repeated FallbackProto fallback = 6; // Short descriptive paragraph optional string description = 8; // Whether only the fallback positions should be used, for example, an axis // might have only three relevant positions: the min, the middle, and the max. optional bool fallback_only = 9; // The thumbnail image for this axis, if any. optional string illustration_url = 10; // Next = 11 } message FallbackProto { optional string name = 1; optional float value = 2; optional string display_name = 3; } googlefonts-gf-metadata-5fa0932/resources/protos/designers.proto000066400000000000000000000005611521447034200251570ustar00rootroot00000000000000syntax = "proto2"; // GF Designer Profile Protos // A designer listed on the catalog: message DesignerInfoProto { // Designer or typefoundry name: optional string designer = 1; // URL for more info on this designer: optional string link = 2; // Photo or logo: optional AvatarProto avatar = 3; } message AvatarProto { optional string file_name = 1; } googlefonts-gf-metadata-5fa0932/resources/protos/fonts_public.proto000066400000000000000000000107421521447034200256650ustar00rootroot00000000000000syntax = "proto2"; /** * Open Source'd font metadata proto formats. */ package google.fonts_public; option java_package = "com.google.fonts.proto"; option java_outer_classname = "FontsPublic"; message FamilyProto { required string name = 1; required string designer = 2; required string license = 3; // A mutually-exclusive category for each font. The categories are: Serif, // Sans Serif, Display, Handwriting and Monospace. Being mutually exclusive is // a significant deficiency as, for example, most Display fonts are typically // Serif or Sans Serif and that is not captured. // // For searching, this field is replaced by stroke and classifications (see // below), however, this field persists (it's required after all) and will // continue to be populated in the onboarding process. // // This is repeated field, yet Google Fonts only uses the last entry so // multiple entries should be avoided. repeated string category = 4; // Only the LAST value is used by Google Fonts required string date_added = 5; repeated FontProto fonts = 6; repeated string aliases = 7; repeated string subsets = 8; optional string ttf_autohint_args = 9; repeated AxisSegmentProto axes = 10; map registry_default_overrides = 11; optional SourceProto source = 12; optional bool is_noto = 13; repeated string languages = 14; repeated FamilyFallbackProto fallbacks = 15; map sample_glyphs = 16; optional SampleTextProto sample_text = 17; optional string display_name = 18; repeated GlyphGroupProto ordered_sample_glyphs = 19; // Optional url for more info about the font. optional string minisite_url = 20; // The script to use when picking sample text. See the Script spanner table. optional string primary_script = 21; optional string primary_language = 22; // Stroke of the letter forms: serif, sans serif, etc. Stroke is mutually // exclusive. The values are the string names from the Stroke enum or the // empty string. optional string stroke = 23; // A family's broad classifications: display, handwriting, monospace, etc. // The values are the string names from the Classification enum. repeated string classifications = 25; // Next = 25 } message FontProto { required string name = 1; required string style = 2; required int32 weight = 3; required string filename = 4; required string post_script_name = 5; required string full_name = 6; optional string copyright = 7; } message AxisSegmentProto { optional string tag = 1; optional float min_value = 2; reserved 3; reserved "default_value"; optional float max_value = 4; // Next = 5 } message SourceProto { optional string repository_url = 1; optional string branch = 5; optional string commit = 2; optional string archive_url = 3; optional string config_yaml = 6; // See https://github.com/googlefonts/fontc/issues/1124 repeated SourceFileProto files = 4; // Next = 7 } // A file to take from source and where to put it in dest // Ex web/split/Roboto[wdth,wght].ttf => Roboto[wdth,wght].ttf message SourceFileProto { optional string source_file = 1; optional string dest_file = 2; } enum TargetTypeProto { TARGET_UNSPECIFIED = 0; TARGET_OS_WINDOWS = 1; TARGET_OS_MAC = 2; TARGET_OS_LINUX = 3; TARGET_OS_ANDROID = 4; TARGET_OS_IOS = 5; } // Message so we can add additional fields like value in future message TargetProto { optional TargetTypeProto target_type = 1; // e.g., OS } message FamilyFallbackProto { repeated AxisSegmentProto axis_target = 1; // activate for this region repeated TargetProto target = 2; // activate for any of these optional float size_adjust_pct = 3; // e.g. 90% optional float ascent_override_pct = 5; // e.g. 110% repeated string local_src = 4; // e.g. Impact; the local family to use // Next = 6 } // Corresponds to SampleTextProto in // google3/java/com/google/fonts/backend/spanner/google_fonts_proto.proto message SampleTextProto { optional string masthead_full = 1; optional string masthead_partial = 2; optional string styles = 3; optional string tester = 4; optional string poster_sm = 5; optional string poster_md = 6; optional string poster_lg = 7; optional string specimen_48 = 8; optional string specimen_36 = 9; optional string specimen_32 = 10; optional string specimen_21 = 11; optional string specimen_16 = 12; optional string note = 13; } message GlyphGroupProto { optional string name = 1; optional string glyphs = 2; } googlefonts-gf-metadata-5fa0932/resources/protos/knowledge.proto000066400000000000000000000047701521447034200251610ustar00rootroot00000000000000syntax = "proto2"; /** * Proto definitions for Fonts Knowledge metadata in the filesystem. */ package fonts; option java_package = "com.google.fonts.proto"; option java_outer_classname = "Knowledge"; /** Knowledge metadata. */ message KnowledgeProto { /** Module ids in order. */ repeated string modules = 1; // Next = 2 } /** * Knowledge module metadata. * *

Module id is inferred from directory name in the filesystem. */ message ModuleProto { repeated string alt_ids = 1; optional string name = 2; /** Brief description of the module. */ optional string excerpt = 3; /** Ids of constituent lessons in order. */ repeated string lessons = 4; // Next = 5 } /** * Knowledge topic metadata. * *

Topic id is inferred from directory name in the filesystem. */ message TopicProto { repeated string alt_ids = 1; optional string name = 2; // Next = 3 } /** * Knowledge lesson metadata. * *

Lesson id, as well as id of the parent module, are inferred from path in * the filesystem. */ message LessonProto { repeated string alt_ids = 1; optional string name = 2; repeated string authors = 3; repeated string reviewers = 4; /** Ids of tagged topics. */ repeated string topics = 5; /** Ids of lessons to read before this one. */ repeated string prev_lessons = 6; /** Ids of lessons to read after this one. */ repeated string next_lessons = 7; /** Ids of related glossary terms. */ repeated string related_terms = 8; /** Brief description of the lesson. */ optional string excerpt = 9; /** URLs of related content, for example for use in an iframe. */ repeated string related_content_urls = 10; // Next = 11 } /** * Knowledge glossary term metadata. * *

Term id is inferred from directory name in the filesystem. */ message TermProto { repeated string alt_ids = 1; optional string name = 2; /** Brief description of the glossary term. */ optional string excerpt = 3; /** Ids of related lessons. */ repeated string related_lessons = 4; /** URLs of related content, for example for use in an iframe. */ repeated string related_content_urls = 5; // Next = 6 } /** * Knowledge contributor metadata. * *

Contributors appear in other Knowledge metadata as authors/reviewers of * lessons. */ message ContributorsProto { repeated ContributorProto contributors = 1; // Next = 2 message ContributorProto { optional string name = 1; /** URL to the person's personal site. */ optional string personal_site = 2; // Next = 3 } }googlefonts-gf-metadata-5fa0932/resources/protos/languages_public.proto000066400000000000000000000040311521447034200264740ustar00rootroot00000000000000syntax = "proto2"; /** * languages/regions/scripts proto formats. */ package google.languages_public; // A region or territory as defined in the CLDR message RegionProto { optional string id = 1; // Region codes defined by CLDR optional string name = 2; optional int32 population = 3; repeated string region_group = 4; // Next = 5; } message ScriptProto { optional string id = 1; // Script codes defined by CLDR optional string name = 2; optional bool historical = 3; optional bool fictional = 4; optional string family = 5; optional string summary = 6; // Next = 6; } message LanguageProto { optional string id = 1; // Either ${lang} or ${lang}_${script} optional string language = 2; // BCP 47 optional string script = 3; optional string name = 4; optional string preferred_name = 5; optional string autonym = 6; // Name of language as written in that language optional int32 population = 7; repeated string region = 8; optional ExemplarCharsProto exemplar_chars = 9; optional SampleTextProto sample_text = 10; optional bool historical = 11; repeated string source = 12; optional string note = 13; // Next = 12; } // Space-separated lists of characters representative of a given language. message ExemplarCharsProto { optional string base = 1; optional string auxiliary = 2; optional string marks = 3; optional string numerals = 4; optional string punctuation = 5; optional string index = 6; optional string not_required = 7; // Base characters which can be ignored when determining language support // Next = 8; } message SampleTextProto { optional string masthead_full = 1; optional string masthead_partial = 2; optional string styles = 3; optional string tester = 4; optional string poster_sm = 5; optional string poster_md = 6; optional string poster_lg = 7; optional string specimen_48 = 8; optional string specimen_36 = 9; optional string specimen_32 = 10; optional string specimen_21 = 11; optional string specimen_16 = 12; optional string note = 13; } googlefonts-gf-metadata-5fa0932/resources/scripts/000077500000000000000000000000001521447034200222465ustar00rootroot00000000000000googlefonts-gf-metadata-5fa0932/resources/scripts/embed_data.proto000066400000000000000000000007511521447034200254030ustar00rootroot00000000000000syntax = "proto2"; message FloatVecProto { repeated float value = 1; } message MetadataProto { optional string key = 1; optional string value = 2; } message EmbedDataProto { optional string text = 1; repeated MetadataProto metadata = 2; // 1 => DenseVector // 2+ => MultiVector // Ref https://github.com/StarlightSearch/EmbedAnything/blob/1a004c6a5dd3cb1e8c1b597088530461b797d6d7/rust/src/embeddings/embed.rs#L29 repeated FloatVecProto result = 3; }googlefonts-gf-metadata-5fa0932/resources/scripts/protoc.sh000077500000000000000000000004521521447034200241140ustar00rootroot00000000000000 # assumes protoc is installed # Mac: brew install protoc # Many Linux: sudo apt-get install protoc cargo install protobuf-codegen PATH="$HOME/.cargo/bin:$PATH" mkdir -p Lib/gfmetadata/ protoc -I resources/protos --rs_out src/ --python_out Lib/gfmetadata resources/protos/*.proto rm src/mod.rs googlefonts-gf-metadata-5fa0932/resources/testdata/000077500000000000000000000000001521447034200223705ustar00rootroot00000000000000googlefonts-gf-metadata-5fa0932/resources/testdata/kosugimaru-metadata.pb000066400000000000000000000014451521447034200266630ustar00rootroot00000000000000name: "Kosugi Maru" designer: "MOTOYA" license: "APACHE2" category: "SANS_SERIF" date_added: "2021-09-08" fonts { name: "Kosugi Maru" style: "normal" weight: 400 filename: "KosugiMaru-Regular.ttf" post_script_name: "KosugiMaru-Regular" full_name: "Kosugi Maru Regular" copyright: "Copyright 2010 The Kosugi Maru Project Authors (https://github.com/googlefonts/kosugi-maru)" } subsets: "cyrillic" subsets: "japanese" subsets: "latin" subsets: "latin-ext" subsets: "menu" source { repository_url: "https://github.com/googlefonts/kosugi-maru" files { source_file: "fonts/ttf/KosugiMaru-Regular.ttf" dest_file: "KosugiMaru-Regular.ttf" } files { source_file: "LICENSE.txt" dest_file: "LICENSE.txt" } branch: "main" } primary_script: "Jpan" primary_language: "Invalid"googlefonts-gf-metadata-5fa0932/resources/testdata/roboto-metadata.pb000066400000000000000000000026671521447034200260100ustar00rootroot00000000000000name: "Roboto" designer: "Christian Robertson, ParaType, Font Bureau" license: "OFL" category: "SANS_SERIF" date_added: "2013-01-09" fonts { name: "Roboto" style: "normal" weight: 400 filename: "Roboto[wdth,wght].ttf" post_script_name: "Roboto-Regular" full_name: "Roboto Regular" copyright: "Copyright 2011 The Roboto Project Authors (https://github.com/googlefonts/roboto-classic)" } fonts { name: "Roboto" style: "italic" weight: 400 filename: "Roboto-Italic[wdth,wght].ttf" post_script_name: "Roboto-Italic" full_name: "Roboto Italic" copyright: "Copyright 2011 The Roboto Project Authors (https://github.com/googlefonts/roboto-classic)" } subsets: "cyrillic" subsets: "cyrillic-ext" subsets: "greek" subsets: "greek-ext" subsets: "latin" subsets: "latin-ext" subsets: "math" subsets: "menu" subsets: "symbols" subsets: "vietnamese" axes { tag: "wdth" min_value: 75.0 max_value: 100.0 } axes { tag: "wght" min_value: 100.0 max_value: 900.0 } source { repository_url: "https://github.com/googlefonts/roboto-classic" commit: "b3ab25297a96373a8053db2d6fbf94b3ce61a8ac" archive_url: "https://github.com/googlefonts/roboto-3-classic/releases/download/v3.011/Roboto_v3.011.zip" files { source_file: "web/split/Roboto[wdth,wght].ttf" dest_file: "Roboto[wdth,wght].ttf" } files { source_file: "web/split/Roboto-Italic[wdth,wght].ttf" dest_file: "Roboto-Italic[wdth,wght].ttf" } branch: "main" } googlefonts-gf-metadata-5fa0932/resources/testdata/wixmadefortext-metadata.pb000066400000000000000000000105031521447034200275420ustar00rootroot00000000000000name: "Wix Madefor Text" designer: "Dalton Maag" license: "OFL" category: "SANS_SERIF" date_added: "2023-01-11" fonts { name: "Wix Madefor Text" style: "normal" weight: 400 filename: "WixMadeforText[wght].ttf" post_script_name: "WixMadeforText-Regular" full_name: "Wix Madefor Text Regular" copyright: "Copyright 2021 The Wix Madefor Project Authors (https://github.com/wix/wixmadefor/)" } fonts { name: "Wix Madefor Text" style: "italic" weight: 400 filename: "WixMadeforText-Italic[wght].ttf" post_script_name: "WixMadeforText-Italic" full_name: "Wix Madefor Text Italic" copyright: "Copyright 2021 The Wix Madefor Project Authors (https://github.com/wix/wixmadefor/)" } fonts { name: "Wix Madefor Text" style: "normal" weight: 400 filename: "WixMadeforText-Regular.ttf" post_script_name: "WixMadeforText-Regular" full_name: "Wix Madefor Text Regular" copyright: "Copyright 2021 The Wix Madefor Project Authors (https://github.com/wix/wixmadefor/)" position { tag: "wght" position: 400.0 } } fonts { name: "Wix Madefor Text" style: "italic" weight: 400 filename: "WixMadeforText-Italic.ttf" post_script_name: "WixMadeforText-Italic" full_name: "Wix Madefor Text Italic" copyright: "Copyright 2021 The Wix Madefor Project Authors (https://github.com/wix/wixmadefor/)" position { tag: "wght" position: 400.0 } } fonts { name: "Wix Madefor Text" style: "normal" weight: 500 filename: "WixMadeforText-Medium.ttf" post_script_name: "WixMadeforText-Medium" full_name: "Wix Madefor Text Medium" copyright: "Copyright 2021 The Wix Madefor Project Authors (https://github.com/wix/wixmadefor/)" position { tag: "wght" position: 500.0 } } fonts { name: "Wix Madefor Text" style: "italic" weight: 500 filename: "WixMadeforText-MediumItalic.ttf" post_script_name: "WixMadeforText-MediumItalic" full_name: "Wix Madefor Text Medium Italic" copyright: "Copyright 2021 The Wix Madefor Project Authors (https://github.com/wix/wixmadefor/)" position { tag: "wght" position: 500.0 } } fonts { name: "Wix Madefor Text" style: "normal" weight: 600 filename: "WixMadeforText-SemiBold.ttf" post_script_name: "WixMadeforText-SemiBold" full_name: "Wix Madefor Text SemiBold" copyright: "Copyright 2021 The Wix Madefor Project Authors (https://github.com/wix/wixmadefor/)" position { tag: "wght" position: 600.0 } } fonts { name: "Wix Madefor Text" style: "italic" weight: 600 filename: "WixMadeforText-SemiBoldItalic.ttf" post_script_name: "WixMadeforText-SemiBoldItalic" full_name: "Wix Madefor Text SemiBold Italic" copyright: "Copyright 2021 The Wix Madefor Project Authors (https://github.com/wix/wixmadefor/)" position { tag: "wght" position: 600.0 } } fonts { name: "Wix Madefor Text" style: "normal" weight: 700 filename: "WixMadeforText-Bold.ttf" post_script_name: "WixMadeforText-Bold" full_name: "Wix Madefor Text Bold" copyright: "Copyright 2021 The Wix Madefor Project Authors (https://github.com/wix/wixmadefor/)" position { tag: "wght" position: 700.0 } } fonts { name: "Wix Madefor Text" style: "italic" weight: 700 filename: "WixMadeforText-BoldItalic.ttf" post_script_name: "WixMadeforText-BoldItalic" full_name: "Wix Madefor Text Bold Italic" copyright: "Copyright 2021 The Wix Madefor Project Authors (https://github.com/wix/wixmadefor/)" position { tag: "wght" position: 700.0 } } fonts { name: "Wix Madefor Text" style: "normal" weight: 800 filename: "WixMadeforText-ExtraBold.ttf" post_script_name: "WixMadeforText-ExtraBold" full_name: "Wix Madefor Text ExtraBold" copyright: "Copyright 2021 The Wix Madefor Project Authors (https://github.com/wix/wixmadefor/)" position { tag: "wght" position: 800.0 } } fonts { name: "Wix Madefor Text" style: "italic" weight: 800 filename: "WixMadeforText-ExtraBoldItalic.ttf" post_script_name: "WixMadeforText-ExtraBoldItalic" full_name: "Wix Madefor Text ExtraBold Italic" copyright: "Copyright 2021 The Wix Madefor Project Authors (https://github.com/wix/wixmadefor/)" position { tag: "wght" position: 800.0 } } subsets: "cyrillic" subsets: "cyrillic-ext" subsets: "latin" subsets: "latin-ext" subsets: "menu" subsets: "vietnamese" axes { tag: "wght" min_value: 400.0 max_value: 800.0 } googlefonts-gf-metadata-5fa0932/src/000077500000000000000000000000001521447034200173345ustar00rootroot00000000000000googlefonts-gf-metadata-5fa0932/src/axes.rs000066400000000000000000001030461521447034200206460ustar00rootroot00000000000000// This file is generated by rust-protobuf 3.7.2. Do not edit // .proto file is parsed by protoc --rs_out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![cfg_attr(rustfmt, rustfmt::skip)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(trivial_casts)] #![allow(unused_results)] #![allow(unused_mut)] //! Generated file from `axes.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; /// An axis in the GF Axis Registry // @@protoc_insertion_point(message:AxisProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct AxisProto { // message fields /// Axis tag // @@protoc_insertion_point(field:AxisProto.tag) pub tag: ::std::option::Option<::std::string::String>, /// Display name for axis, e.g. "Optical size" for 'opsz' /// Like 'Name' in /// https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxistag_opsz // @@protoc_insertion_point(field:AxisProto.display_name) pub display_name: ::std::option::Option<::std::string::String>, /// Lower bound for the axis // @@protoc_insertion_point(field:AxisProto.min_value) pub min_value: ::std::option::Option, /// The default position to use and to prefer for exemplars // @@protoc_insertion_point(field:AxisProto.default_value) pub default_value: ::std::option::Option, /// Upper bound for the axis // @@protoc_insertion_point(field:AxisProto.max_value) pub max_value: ::std::option::Option, /// Input values for this axis must aligned to 10^precision // @@protoc_insertion_point(field:AxisProto.precision) pub precision: ::std::option::Option, /// Fallback positions along the axis // @@protoc_insertion_point(field:AxisProto.fallback) pub fallback: ::std::vec::Vec, /// Short descriptive paragraph // @@protoc_insertion_point(field:AxisProto.description) pub description: ::std::option::Option<::std::string::String>, /// Whether only the fallback positions should be used, for example, an axis /// might have only three relevant positions: the min, the middle, and the max. // @@protoc_insertion_point(field:AxisProto.fallback_only) pub fallback_only: ::std::option::Option, /// The thumbnail image for this axis, if any. // @@protoc_insertion_point(field:AxisProto.illustration_url) pub illustration_url: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:AxisProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a AxisProto { fn default() -> &'a AxisProto { ::default_instance() } } impl AxisProto { pub fn new() -> AxisProto { ::std::default::Default::default() } // optional string tag = 1; pub fn tag(&self) -> &str { match self.tag.as_ref() { Some(v) => v, None => "", } } pub fn clear_tag(&mut self) { self.tag = ::std::option::Option::None; } pub fn has_tag(&self) -> bool { self.tag.is_some() } // Param is passed by value, moved pub fn set_tag(&mut self, v: ::std::string::String) { self.tag = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_tag(&mut self) -> &mut ::std::string::String { if self.tag.is_none() { self.tag = ::std::option::Option::Some(::std::string::String::new()); } self.tag.as_mut().unwrap() } // Take field pub fn take_tag(&mut self) -> ::std::string::String { self.tag.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string display_name = 7; pub fn display_name(&self) -> &str { match self.display_name.as_ref() { Some(v) => v, None => "", } } pub fn clear_display_name(&mut self) { self.display_name = ::std::option::Option::None; } pub fn has_display_name(&self) -> bool { self.display_name.is_some() } // Param is passed by value, moved pub fn set_display_name(&mut self, v: ::std::string::String) { self.display_name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_display_name(&mut self) -> &mut ::std::string::String { if self.display_name.is_none() { self.display_name = ::std::option::Option::Some(::std::string::String::new()); } self.display_name.as_mut().unwrap() } // Take field pub fn take_display_name(&mut self) -> ::std::string::String { self.display_name.take().unwrap_or_else(|| ::std::string::String::new()) } // optional float min_value = 2; pub fn min_value(&self) -> f32 { self.min_value.unwrap_or(0.) } pub fn clear_min_value(&mut self) { self.min_value = ::std::option::Option::None; } pub fn has_min_value(&self) -> bool { self.min_value.is_some() } // Param is passed by value, moved pub fn set_min_value(&mut self, v: f32) { self.min_value = ::std::option::Option::Some(v); } // optional float default_value = 3; pub fn default_value(&self) -> f32 { self.default_value.unwrap_or(0.) } pub fn clear_default_value(&mut self) { self.default_value = ::std::option::Option::None; } pub fn has_default_value(&self) -> bool { self.default_value.is_some() } // Param is passed by value, moved pub fn set_default_value(&mut self, v: f32) { self.default_value = ::std::option::Option::Some(v); } // optional float max_value = 4; pub fn max_value(&self) -> f32 { self.max_value.unwrap_or(0.) } pub fn clear_max_value(&mut self) { self.max_value = ::std::option::Option::None; } pub fn has_max_value(&self) -> bool { self.max_value.is_some() } // Param is passed by value, moved pub fn set_max_value(&mut self, v: f32) { self.max_value = ::std::option::Option::Some(v); } // optional int32 precision = 5; pub fn precision(&self) -> i32 { self.precision.unwrap_or(0) } pub fn clear_precision(&mut self) { self.precision = ::std::option::Option::None; } pub fn has_precision(&self) -> bool { self.precision.is_some() } // Param is passed by value, moved pub fn set_precision(&mut self, v: i32) { self.precision = ::std::option::Option::Some(v); } // optional string description = 8; pub fn description(&self) -> &str { match self.description.as_ref() { Some(v) => v, None => "", } } pub fn clear_description(&mut self) { self.description = ::std::option::Option::None; } pub fn has_description(&self) -> bool { self.description.is_some() } // Param is passed by value, moved pub fn set_description(&mut self, v: ::std::string::String) { self.description = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_description(&mut self) -> &mut ::std::string::String { if self.description.is_none() { self.description = ::std::option::Option::Some(::std::string::String::new()); } self.description.as_mut().unwrap() } // Take field pub fn take_description(&mut self) -> ::std::string::String { self.description.take().unwrap_or_else(|| ::std::string::String::new()) } // optional bool fallback_only = 9; pub fn fallback_only(&self) -> bool { self.fallback_only.unwrap_or(false) } pub fn clear_fallback_only(&mut self) { self.fallback_only = ::std::option::Option::None; } pub fn has_fallback_only(&self) -> bool { self.fallback_only.is_some() } // Param is passed by value, moved pub fn set_fallback_only(&mut self, v: bool) { self.fallback_only = ::std::option::Option::Some(v); } // optional string illustration_url = 10; pub fn illustration_url(&self) -> &str { match self.illustration_url.as_ref() { Some(v) => v, None => "", } } pub fn clear_illustration_url(&mut self) { self.illustration_url = ::std::option::Option::None; } pub fn has_illustration_url(&self) -> bool { self.illustration_url.is_some() } // Param is passed by value, moved pub fn set_illustration_url(&mut self, v: ::std::string::String) { self.illustration_url = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_illustration_url(&mut self) -> &mut ::std::string::String { if self.illustration_url.is_none() { self.illustration_url = ::std::option::Option::Some(::std::string::String::new()); } self.illustration_url.as_mut().unwrap() } // Take field pub fn take_illustration_url(&mut self) -> ::std::string::String { self.illustration_url.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(10); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "tag", |m: &AxisProto| { &m.tag }, |m: &mut AxisProto| { &mut m.tag }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "display_name", |m: &AxisProto| { &m.display_name }, |m: &mut AxisProto| { &mut m.display_name }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "min_value", |m: &AxisProto| { &m.min_value }, |m: &mut AxisProto| { &mut m.min_value }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "default_value", |m: &AxisProto| { &m.default_value }, |m: &mut AxisProto| { &mut m.default_value }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "max_value", |m: &AxisProto| { &m.max_value }, |m: &mut AxisProto| { &mut m.max_value }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "precision", |m: &AxisProto| { &m.precision }, |m: &mut AxisProto| { &mut m.precision }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "fallback", |m: &AxisProto| { &m.fallback }, |m: &mut AxisProto| { &mut m.fallback }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "description", |m: &AxisProto| { &m.description }, |m: &mut AxisProto| { &mut m.description }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "fallback_only", |m: &AxisProto| { &m.fallback_only }, |m: &mut AxisProto| { &mut m.fallback_only }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "illustration_url", |m: &AxisProto| { &m.illustration_url }, |m: &mut AxisProto| { &mut m.illustration_url }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "AxisProto", fields, oneofs, ) } } impl ::protobuf::Message for AxisProto { const NAME: &'static str = "AxisProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.tag = ::std::option::Option::Some(is.read_string()?); }, 58 => { self.display_name = ::std::option::Option::Some(is.read_string()?); }, 21 => { self.min_value = ::std::option::Option::Some(is.read_float()?); }, 29 => { self.default_value = ::std::option::Option::Some(is.read_float()?); }, 37 => { self.max_value = ::std::option::Option::Some(is.read_float()?); }, 40 => { self.precision = ::std::option::Option::Some(is.read_int32()?); }, 50 => { self.fallback.push(is.read_message()?); }, 66 => { self.description = ::std::option::Option::Some(is.read_string()?); }, 72 => { self.fallback_only = ::std::option::Option::Some(is.read_bool()?); }, 82 => { self.illustration_url = ::std::option::Option::Some(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.tag.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.display_name.as_ref() { my_size += ::protobuf::rt::string_size(7, &v); } if let Some(v) = self.min_value { my_size += 1 + 4; } if let Some(v) = self.default_value { my_size += 1 + 4; } if let Some(v) = self.max_value { my_size += 1 + 4; } if let Some(v) = self.precision { my_size += ::protobuf::rt::int32_size(5, v); } for value in &self.fallback { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; if let Some(v) = self.description.as_ref() { my_size += ::protobuf::rt::string_size(8, &v); } if let Some(v) = self.fallback_only { my_size += 1 + 1; } if let Some(v) = self.illustration_url.as_ref() { my_size += ::protobuf::rt::string_size(10, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.tag.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.display_name.as_ref() { os.write_string(7, v)?; } if let Some(v) = self.min_value { os.write_float(2, v)?; } if let Some(v) = self.default_value { os.write_float(3, v)?; } if let Some(v) = self.max_value { os.write_float(4, v)?; } if let Some(v) = self.precision { os.write_int32(5, v)?; } for v in &self.fallback { ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; }; if let Some(v) = self.description.as_ref() { os.write_string(8, v)?; } if let Some(v) = self.fallback_only { os.write_bool(9, v)?; } if let Some(v) = self.illustration_url.as_ref() { os.write_string(10, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> AxisProto { AxisProto::new() } fn clear(&mut self) { self.tag = ::std::option::Option::None; self.display_name = ::std::option::Option::None; self.min_value = ::std::option::Option::None; self.default_value = ::std::option::Option::None; self.max_value = ::std::option::Option::None; self.precision = ::std::option::Option::None; self.fallback.clear(); self.description = ::std::option::Option::None; self.fallback_only = ::std::option::Option::None; self.illustration_url = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static AxisProto { static instance: AxisProto = AxisProto { tag: ::std::option::Option::None, display_name: ::std::option::Option::None, min_value: ::std::option::Option::None, default_value: ::std::option::Option::None, max_value: ::std::option::Option::None, precision: ::std::option::Option::None, fallback: ::std::vec::Vec::new(), description: ::std::option::Option::None, fallback_only: ::std::option::Option::None, illustration_url: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for AxisProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("AxisProto").unwrap()).clone() } } impl ::std::fmt::Display for AxisProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for AxisProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:FallbackProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct FallbackProto { // message fields // @@protoc_insertion_point(field:FallbackProto.name) pub name: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:FallbackProto.value) pub value: ::std::option::Option, // @@protoc_insertion_point(field:FallbackProto.display_name) pub display_name: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:FallbackProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a FallbackProto { fn default() -> &'a FallbackProto { ::default_instance() } } impl FallbackProto { pub fn new() -> FallbackProto { ::std::default::Default::default() } // optional string name = 1; pub fn name(&self) -> &str { match self.name.as_ref() { Some(v) => v, None => "", } } pub fn clear_name(&mut self) { self.name = ::std::option::Option::None; } pub fn has_name(&self) -> bool { self.name.is_some() } // Param is passed by value, moved pub fn set_name(&mut self, v: ::std::string::String) { self.name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_name(&mut self) -> &mut ::std::string::String { if self.name.is_none() { self.name = ::std::option::Option::Some(::std::string::String::new()); } self.name.as_mut().unwrap() } // Take field pub fn take_name(&mut self) -> ::std::string::String { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } // optional float value = 2; pub fn value(&self) -> f32 { self.value.unwrap_or(0.) } pub fn clear_value(&mut self) { self.value = ::std::option::Option::None; } pub fn has_value(&self) -> bool { self.value.is_some() } // Param is passed by value, moved pub fn set_value(&mut self, v: f32) { self.value = ::std::option::Option::Some(v); } // optional string display_name = 3; pub fn display_name(&self) -> &str { match self.display_name.as_ref() { Some(v) => v, None => "", } } pub fn clear_display_name(&mut self) { self.display_name = ::std::option::Option::None; } pub fn has_display_name(&self) -> bool { self.display_name.is_some() } // Param is passed by value, moved pub fn set_display_name(&mut self, v: ::std::string::String) { self.display_name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_display_name(&mut self) -> &mut ::std::string::String { if self.display_name.is_none() { self.display_name = ::std::option::Option::Some(::std::string::String::new()); } self.display_name.as_mut().unwrap() } // Take field pub fn take_display_name(&mut self) -> ::std::string::String { self.display_name.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(3); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "name", |m: &FallbackProto| { &m.name }, |m: &mut FallbackProto| { &mut m.name }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "value", |m: &FallbackProto| { &m.value }, |m: &mut FallbackProto| { &mut m.value }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "display_name", |m: &FallbackProto| { &m.display_name }, |m: &mut FallbackProto| { &mut m.display_name }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "FallbackProto", fields, oneofs, ) } } impl ::protobuf::Message for FallbackProto { const NAME: &'static str = "FallbackProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.name = ::std::option::Option::Some(is.read_string()?); }, 21 => { self.value = ::std::option::Option::Some(is.read_float()?); }, 26 => { self.display_name = ::std::option::Option::Some(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.name.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.value { my_size += 1 + 4; } if let Some(v) = self.display_name.as_ref() { my_size += ::protobuf::rt::string_size(3, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.name.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.value { os.write_float(2, v)?; } if let Some(v) = self.display_name.as_ref() { os.write_string(3, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> FallbackProto { FallbackProto::new() } fn clear(&mut self) { self.name = ::std::option::Option::None; self.value = ::std::option::Option::None; self.display_name = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static FallbackProto { static instance: FallbackProto = FallbackProto { name: ::std::option::Option::None, value: ::std::option::Option::None, display_name: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for FallbackProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("FallbackProto").unwrap()).clone() } } impl ::std::fmt::Display for FallbackProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for FallbackProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ \n\naxes.proto\"\xdb\x02\n\tAxisProto\x12\x10\n\x03tag\x18\x01\x20\x01(\ \tR\x03tag\x12!\n\x0cdisplay_name\x18\x07\x20\x01(\tR\x0bdisplayName\x12\ \x1b\n\tmin_value\x18\x02\x20\x01(\x02R\x08minValue\x12#\n\rdefault_valu\ e\x18\x03\x20\x01(\x02R\x0cdefaultValue\x12\x1b\n\tmax_value\x18\x04\x20\ \x01(\x02R\x08maxValue\x12\x1c\n\tprecision\x18\x05\x20\x01(\x05R\tpreci\ sion\x12*\n\x08fallback\x18\x06\x20\x03(\x0b2\x0e.FallbackProtoR\x08fall\ back\x12\x20\n\x0bdescription\x18\x08\x20\x01(\tR\x0bdescription\x12#\n\ \rfallback_only\x18\t\x20\x01(\x08R\x0cfallbackOnly\x12)\n\x10illustrati\ on_url\x18\n\x20\x01(\tR\x0fillustrationUrl\"\\\n\rFallbackProto\x12\x12\ \n\x04name\x18\x01\x20\x01(\tR\x04name\x12\x14\n\x05value\x18\x02\x20\ \x01(\x02R\x05value\x12!\n\x0cdisplay_name\x18\x03\x20\x01(\tR\x0bdispla\ yNameJ\xdf\x0c\n\x06\x12\x04\0\0-\x01\n#\n\x01\x0c\x12\x03\0\0\x12\"\x19\ \x20GF\x20Axis\x20Registry\x20Protos\n\n-\n\x02\x04\0\x12\x04\x04\0'\x01\ \x1a!\x20An\x20axis\x20in\x20the\x20GF\x20Axis\x20Registry\n\n\n\n\x03\ \x04\0\x01\x12\x03\x04\x08\x11\n\x17\n\x04\x04\0\x02\0\x12\x03\x06\x02\ \x1a\x1a\n\x20Axis\x20tag\n\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03\x06\x02\ \n\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x06\x0b\x11\n\x0c\n\x05\x04\0\x02\ \0\x01\x12\x03\x06\x12\x15\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x06\x18\ \x19\n\xa1\x01\n\x04\x04\0\x02\x01\x12\x03\x0b\x02#\x1a\x93\x01\x20Displ\ ay\x20name\x20for\x20axis,\x20e.g.\x20\"Optical\x20size\"\x20for\x20'ops\ z'\n\x20Like\x20'Name'\x20in\n\x20https://docs.microsoft.com/en-us/typog\ raphy/opentype/spec/dvaraxistag_opsz\n\n\x0c\n\x05\x04\0\x02\x01\x04\x12\ \x03\x0b\x02\n\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x0b\x0b\x11\n\x0c\n\ \x05\x04\0\x02\x01\x01\x12\x03\x0b\x12\x1e\n\x0c\n\x05\x04\0\x02\x01\x03\ \x12\x03\x0b!\"\n'\n\x04\x04\0\x02\x02\x12\x03\x0e\x02\x1f\x1a\x1a\x20Lo\ wer\x20bound\x20for\x20the\x20axis\n\n\x0c\n\x05\x04\0\x02\x02\x04\x12\ \x03\x0e\x02\n\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x0e\x0b\x10\n\x0c\n\ \x05\x04\0\x02\x02\x01\x12\x03\x0e\x11\x1a\n\x0c\n\x05\x04\0\x02\x02\x03\ \x12\x03\x0e\x1d\x1e\nF\n\x04\x04\0\x02\x03\x12\x03\x11\x02#\x1a9\x20The\ \x20default\x20position\x20to\x20use\x20and\x20to\x20prefer\x20for\x20ex\ emplars\n\n\x0c\n\x05\x04\0\x02\x03\x04\x12\x03\x11\x02\n\n\x0c\n\x05\ \x04\0\x02\x03\x05\x12\x03\x11\x0b\x10\n\x0c\n\x05\x04\0\x02\x03\x01\x12\ \x03\x11\x11\x1e\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x11!\"\n'\n\x04\ \x04\0\x02\x04\x12\x03\x14\x02\x1f\x1a\x1a\x20Upper\x20bound\x20for\x20t\ he\x20axis\n\n\x0c\n\x05\x04\0\x02\x04\x04\x12\x03\x14\x02\n\n\x0c\n\x05\ \x04\0\x02\x04\x05\x12\x03\x14\x0b\x10\n\x0c\n\x05\x04\0\x02\x04\x01\x12\ \x03\x14\x11\x1a\n\x0c\n\x05\x04\0\x02\x04\x03\x12\x03\x14\x1d\x1e\nF\n\ \x04\x04\0\x02\x05\x12\x03\x17\x02\x1f\x1a9\x20Input\x20values\x20for\ \x20this\x20axis\x20must\x20aligned\x20to\x2010^precision\n\n\x0c\n\x05\ \x04\0\x02\x05\x04\x12\x03\x17\x02\n\n\x0c\n\x05\x04\0\x02\x05\x05\x12\ \x03\x17\x0b\x10\n\x0c\n\x05\x04\0\x02\x05\x01\x12\x03\x17\x11\x1a\n\x0c\ \n\x05\x04\0\x02\x05\x03\x12\x03\x17\x1d\x1e\n0\n\x04\x04\0\x02\x06\x12\ \x03\x1a\x02&\x1a#\x20Fallback\x20positions\x20along\x20the\x20axis\n\n\ \x0c\n\x05\x04\0\x02\x06\x04\x12\x03\x1a\x02\n\n\x0c\n\x05\x04\0\x02\x06\ \x06\x12\x03\x1a\x0b\x18\n\x0c\n\x05\x04\0\x02\x06\x01\x12\x03\x1a\x19!\ \n\x0c\n\x05\x04\0\x02\x06\x03\x12\x03\x1a$%\n*\n\x04\x04\0\x02\x07\x12\ \x03\x1d\x02\"\x1a\x1d\x20Short\x20descriptive\x20paragraph\n\n\x0c\n\ \x05\x04\0\x02\x07\x04\x12\x03\x1d\x02\n\n\x0c\n\x05\x04\0\x02\x07\x05\ \x12\x03\x1d\x0b\x11\n\x0c\n\x05\x04\0\x02\x07\x01\x12\x03\x1d\x12\x1d\n\ \x0c\n\x05\x04\0\x02\x07\x03\x12\x03\x1d\x20!\n\xa5\x01\n\x04\x04\0\x02\ \x08\x12\x03!\x02\"\x1a\x97\x01\x20Whether\x20only\x20the\x20fallback\ \x20positions\x20should\x20be\x20used,\x20for\x20example,\x20an\x20axis\ \n\x20might\x20have\x20only\x20three\x20relevant\x20positions:\x20the\ \x20min,\x20the\x20middle,\x20and\x20the\x20max.\n\n\x0c\n\x05\x04\0\x02\ \x08\x04\x12\x03!\x02\n\n\x0c\n\x05\x04\0\x02\x08\x05\x12\x03!\x0b\x0f\n\ \x0c\n\x05\x04\0\x02\x08\x01\x12\x03!\x10\x1d\n\x0c\n\x05\x04\0\x02\x08\ \x03\x12\x03!\x20!\n9\n\x04\x04\0\x02\t\x12\x03$\x02(\x1a,\x20The\x20thu\ mbnail\x20image\x20for\x20this\x20axis,\x20if\x20any.\n\n\x0c\n\x05\x04\ \0\x02\t\x04\x12\x03$\x02\n\n\x0c\n\x05\x04\0\x02\t\x05\x12\x03$\x0b\x11\ \n\x0c\n\x05\x04\0\x02\t\x01\x12\x03$\x12\"\n\x0c\n\x05\x04\0\x02\t\x03\ \x12\x03$%'\n\n\n\x02\x04\x01\x12\x04)\0-\x01\n\n\n\x03\x04\x01\x01\x12\ \x03)\x08\x15\n\x0b\n\x04\x04\x01\x02\0\x12\x03*\x02\x1b\n\x0c\n\x05\x04\ \x01\x02\0\x04\x12\x03*\x02\n\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03*\x0b\ \x11\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03*\x12\x16\n\x0c\n\x05\x04\x01\ \x02\0\x03\x12\x03*\x19\x1a\n\x0b\n\x04\x04\x01\x02\x01\x12\x03+\x02\x1b\ \n\x0c\n\x05\x04\x01\x02\x01\x04\x12\x03+\x02\n\n\x0c\n\x05\x04\x01\x02\ \x01\x05\x12\x03+\x0b\x10\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03+\x11\ \x16\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03+\x19\x1a\n\x0b\n\x04\x04\ \x01\x02\x02\x12\x03,\x02#\n\x0c\n\x05\x04\x01\x02\x02\x04\x12\x03,\x02\ \n\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03,\x0b\x11\n\x0c\n\x05\x04\x01\ \x02\x02\x01\x12\x03,\x12\x1e\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03,!\ \"\ "; /// `FileDescriptorProto` object which was a source for this generated file fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); file_descriptor_proto_lazy.get(|| { ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() }) } /// `FileDescriptor` object which allows dynamic access to files pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); file_descriptor.get(|| { let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { let mut deps = ::std::vec::Vec::with_capacity(0); let mut messages = ::std::vec::Vec::with_capacity(2); messages.push(AxisProto::generated_message_descriptor_data()); messages.push(FallbackProto::generated_message_descriptor_data()); let mut enums = ::std::vec::Vec::with_capacity(0); ::protobuf::reflect::GeneratedFileDescriptor::new_generated( file_descriptor_proto(), deps, messages, enums, ) }); ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } googlefonts-gf-metadata-5fa0932/src/designers.rs000066400000000000000000000417541521447034200217000ustar00rootroot00000000000000// This file is generated by rust-protobuf 3.7.2. Do not edit // .proto file is parsed by protoc --rs_out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![cfg_attr(rustfmt, rustfmt::skip)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(trivial_casts)] #![allow(unused_results)] #![allow(unused_mut)] //! Generated file from `designers.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; /// A designer listed on the catalog: // @@protoc_insertion_point(message:DesignerInfoProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct DesignerInfoProto { // message fields /// Designer or typefoundry name: // @@protoc_insertion_point(field:DesignerInfoProto.designer) pub designer: ::std::option::Option<::std::string::String>, /// URL for more info on this designer: // @@protoc_insertion_point(field:DesignerInfoProto.link) pub link: ::std::option::Option<::std::string::String>, /// Photo or logo: // @@protoc_insertion_point(field:DesignerInfoProto.avatar) pub avatar: ::protobuf::MessageField, // special fields // @@protoc_insertion_point(special_field:DesignerInfoProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DesignerInfoProto { fn default() -> &'a DesignerInfoProto { ::default_instance() } } impl DesignerInfoProto { pub fn new() -> DesignerInfoProto { ::std::default::Default::default() } // optional string designer = 1; pub fn designer(&self) -> &str { match self.designer.as_ref() { Some(v) => v, None => "", } } pub fn clear_designer(&mut self) { self.designer = ::std::option::Option::None; } pub fn has_designer(&self) -> bool { self.designer.is_some() } // Param is passed by value, moved pub fn set_designer(&mut self, v: ::std::string::String) { self.designer = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_designer(&mut self) -> &mut ::std::string::String { if self.designer.is_none() { self.designer = ::std::option::Option::Some(::std::string::String::new()); } self.designer.as_mut().unwrap() } // Take field pub fn take_designer(&mut self) -> ::std::string::String { self.designer.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string link = 2; pub fn link(&self) -> &str { match self.link.as_ref() { Some(v) => v, None => "", } } pub fn clear_link(&mut self) { self.link = ::std::option::Option::None; } pub fn has_link(&self) -> bool { self.link.is_some() } // Param is passed by value, moved pub fn set_link(&mut self, v: ::std::string::String) { self.link = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_link(&mut self) -> &mut ::std::string::String { if self.link.is_none() { self.link = ::std::option::Option::Some(::std::string::String::new()); } self.link.as_mut().unwrap() } // Take field pub fn take_link(&mut self) -> ::std::string::String { self.link.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(3); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "designer", |m: &DesignerInfoProto| { &m.designer }, |m: &mut DesignerInfoProto| { &mut m.designer }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "link", |m: &DesignerInfoProto| { &m.link }, |m: &mut DesignerInfoProto| { &mut m.link }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, AvatarProto>( "avatar", |m: &DesignerInfoProto| { &m.avatar }, |m: &mut DesignerInfoProto| { &mut m.avatar }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "DesignerInfoProto", fields, oneofs, ) } } impl ::protobuf::Message for DesignerInfoProto { const NAME: &'static str = "DesignerInfoProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.designer = ::std::option::Option::Some(is.read_string()?); }, 18 => { self.link = ::std::option::Option::Some(is.read_string()?); }, 26 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.avatar)?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.designer.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.link.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } if let Some(v) = self.avatar.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.designer.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.link.as_ref() { os.write_string(2, v)?; } if let Some(v) = self.avatar.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> DesignerInfoProto { DesignerInfoProto::new() } fn clear(&mut self) { self.designer = ::std::option::Option::None; self.link = ::std::option::Option::None; self.avatar.clear(); self.special_fields.clear(); } fn default_instance() -> &'static DesignerInfoProto { static instance: DesignerInfoProto = DesignerInfoProto { designer: ::std::option::Option::None, link: ::std::option::Option::None, avatar: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for DesignerInfoProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("DesignerInfoProto").unwrap()).clone() } } impl ::std::fmt::Display for DesignerInfoProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DesignerInfoProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:AvatarProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct AvatarProto { // message fields // @@protoc_insertion_point(field:AvatarProto.file_name) pub file_name: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:AvatarProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a AvatarProto { fn default() -> &'a AvatarProto { ::default_instance() } } impl AvatarProto { pub fn new() -> AvatarProto { ::std::default::Default::default() } // optional string file_name = 1; pub fn file_name(&self) -> &str { match self.file_name.as_ref() { Some(v) => v, None => "", } } pub fn clear_file_name(&mut self) { self.file_name = ::std::option::Option::None; } pub fn has_file_name(&self) -> bool { self.file_name.is_some() } // Param is passed by value, moved pub fn set_file_name(&mut self, v: ::std::string::String) { self.file_name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_file_name(&mut self) -> &mut ::std::string::String { if self.file_name.is_none() { self.file_name = ::std::option::Option::Some(::std::string::String::new()); } self.file_name.as_mut().unwrap() } // Take field pub fn take_file_name(&mut self) -> ::std::string::String { self.file_name.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "file_name", |m: &AvatarProto| { &m.file_name }, |m: &mut AvatarProto| { &mut m.file_name }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "AvatarProto", fields, oneofs, ) } } impl ::protobuf::Message for AvatarProto { const NAME: &'static str = "AvatarProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.file_name = ::std::option::Option::Some(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.file_name.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.file_name.as_ref() { os.write_string(1, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> AvatarProto { AvatarProto::new() } fn clear(&mut self) { self.file_name = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static AvatarProto { static instance: AvatarProto = AvatarProto { file_name: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for AvatarProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("AvatarProto").unwrap()).clone() } } impl ::std::fmt::Display for AvatarProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for AvatarProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ \n\x0fdesigners.proto\"i\n\x11DesignerInfoProto\x12\x1a\n\x08designer\ \x18\x01\x20\x01(\tR\x08designer\x12\x12\n\x04link\x18\x02\x20\x01(\tR\ \x04link\x12$\n\x06avatar\x18\x03\x20\x01(\x0b2\x0c.AvatarProtoR\x06avat\ ar\"*\n\x0bAvatarProto\x12\x1b\n\tfile_name\x18\x01\x20\x01(\tR\x08fileN\ ameJ\xf3\x03\n\x06\x12\x04\0\0\x11\x01\n&\n\x01\x0c\x12\x03\0\0\x12\"\ \x1c\x20GF\x20Designer\x20Profile\x20Protos\n\n/\n\x02\x04\0\x12\x04\x04\ \0\r\x01\x1a#\x20A\x20designer\x20listed\x20on\x20the\x20catalog:\n\n\n\ \n\x03\x04\0\x01\x12\x03\x04\x08\x19\n,\n\x04\x04\0\x02\0\x12\x03\x06\ \x02\x1f\x1a\x1f\x20Designer\x20or\x20typefoundry\x20name:\n\n\x0c\n\x05\ \x04\0\x02\0\x04\x12\x03\x06\x02\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\ \x06\x0b\x11\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x06\x12\x1a\n\x0c\n\x05\ \x04\0\x02\0\x03\x12\x03\x06\x1d\x1e\n2\n\x04\x04\0\x02\x01\x12\x03\t\ \x02\x1b\x1a%\x20URL\x20for\x20more\x20info\x20on\x20this\x20designer:\n\ \n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03\t\x02\n\n\x0c\n\x05\x04\0\x02\x01\ \x05\x12\x03\t\x0b\x11\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\t\x12\x16\n\ \x0c\n\x05\x04\0\x02\x01\x03\x12\x03\t\x19\x1a\n\x1d\n\x04\x04\0\x02\x02\ \x12\x03\x0c\x02\"\x1a\x10\x20Photo\x20or\x20logo:\n\n\x0c\n\x05\x04\0\ \x02\x02\x04\x12\x03\x0c\x02\n\n\x0c\n\x05\x04\0\x02\x02\x06\x12\x03\x0c\ \x0b\x16\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x0c\x17\x1d\n\x0c\n\x05\ \x04\0\x02\x02\x03\x12\x03\x0c\x20!\n\n\n\x02\x04\x01\x12\x04\x0f\0\x11\ \x01\n\n\n\x03\x04\x01\x01\x12\x03\x0f\x08\x13\n\x0b\n\x04\x04\x01\x02\0\ \x12\x03\x10\x02\x20\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03\x10\x02\n\n\ \x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x10\x0b\x11\n\x0c\n\x05\x04\x01\x02\ \0\x01\x12\x03\x10\x12\x1b\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x10\x1e\ \x1f\ "; /// `FileDescriptorProto` object which was a source for this generated file fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); file_descriptor_proto_lazy.get(|| { ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() }) } /// `FileDescriptor` object which allows dynamic access to files pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); file_descriptor.get(|| { let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { let mut deps = ::std::vec::Vec::with_capacity(0); let mut messages = ::std::vec::Vec::with_capacity(2); messages.push(DesignerInfoProto::generated_message_descriptor_data()); messages.push(AvatarProto::generated_message_descriptor_data()); let mut enums = ::std::vec::Vec::with_capacity(0); ::protobuf::reflect::GeneratedFileDescriptor::new_generated( file_descriptor_proto(), deps, messages, enums, ) }); ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } googlefonts-gf-metadata-5fa0932/src/fonts_public.rs000066400000000000000000005005561521447034200224040ustar00rootroot00000000000000// This file is generated by rust-protobuf 3.7.2. Do not edit // .proto file is parsed by protoc --rs_out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![cfg_attr(rustfmt, rustfmt::skip)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(trivial_casts)] #![allow(unused_results)] #![allow(unused_mut)] //! Generated file from `fonts_public.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; // @@protoc_insertion_point(message:google.fonts_public.FamilyProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct FamilyProto { // message fields // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.name) pub name: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.designer) pub designer: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.license) pub license: ::std::option::Option<::std::string::String>, /// A mutually-exclusive category for each font. The categories are: Serif, /// Sans Serif, Display, Handwriting and Monospace. Being mutually exclusive is /// a significant deficiency as, for example, most Display fonts are typically /// Serif or Sans Serif and that is not captured. /// /// For searching, this field is replaced by stroke and classifications (see /// below), however, this field persists (it's required after all) and will /// continue to be populated in the onboarding process. /// /// This is repeated field, yet Google Fonts only uses the last entry so /// multiple entries should be avoided. // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.category) pub category: ::std::vec::Vec<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.date_added) pub date_added: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.fonts) pub fonts: ::std::vec::Vec, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.aliases) pub aliases: ::std::vec::Vec<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.subsets) pub subsets: ::std::vec::Vec<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.ttf_autohint_args) pub ttf_autohint_args: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.axes) pub axes: ::std::vec::Vec, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.registry_default_overrides) pub registry_default_overrides: ::std::collections::HashMap<::std::string::String, f32>, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.source) pub source: ::protobuf::MessageField, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.is_noto) pub is_noto: ::std::option::Option, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.languages) pub languages: ::std::vec::Vec<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.fallbacks) pub fallbacks: ::std::vec::Vec, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.sample_glyphs) pub sample_glyphs: ::std::collections::HashMap<::std::string::String, ::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.sample_text) pub sample_text: ::protobuf::MessageField, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.display_name) pub display_name: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.ordered_sample_glyphs) pub ordered_sample_glyphs: ::std::vec::Vec, /// Optional url for more info about the font. // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.minisite_url) pub minisite_url: ::std::option::Option<::std::string::String>, /// The script to use when picking sample text. See the Script spanner table. // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.primary_script) pub primary_script: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.primary_language) pub primary_language: ::std::option::Option<::std::string::String>, /// Stroke of the letter forms: serif, sans serif, etc. Stroke is mutually /// exclusive. The values are the string names from the Stroke enum or the /// empty string. // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.stroke) pub stroke: ::std::option::Option<::std::string::String>, /// A family's broad classifications: display, handwriting, monospace, etc. /// The values are the string names from the Classification enum. // @@protoc_insertion_point(field:google.fonts_public.FamilyProto.classifications) pub classifications: ::std::vec::Vec<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:google.fonts_public.FamilyProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a FamilyProto { fn default() -> &'a FamilyProto { ::default_instance() } } impl FamilyProto { pub fn new() -> FamilyProto { ::std::default::Default::default() } // required string name = 1; pub fn name(&self) -> &str { match self.name.as_ref() { Some(v) => v, None => "", } } pub fn clear_name(&mut self) { self.name = ::std::option::Option::None; } pub fn has_name(&self) -> bool { self.name.is_some() } // Param is passed by value, moved pub fn set_name(&mut self, v: ::std::string::String) { self.name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_name(&mut self) -> &mut ::std::string::String { if self.name.is_none() { self.name = ::std::option::Option::Some(::std::string::String::new()); } self.name.as_mut().unwrap() } // Take field pub fn take_name(&mut self) -> ::std::string::String { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } // required string designer = 2; pub fn designer(&self) -> &str { match self.designer.as_ref() { Some(v) => v, None => "", } } pub fn clear_designer(&mut self) { self.designer = ::std::option::Option::None; } pub fn has_designer(&self) -> bool { self.designer.is_some() } // Param is passed by value, moved pub fn set_designer(&mut self, v: ::std::string::String) { self.designer = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_designer(&mut self) -> &mut ::std::string::String { if self.designer.is_none() { self.designer = ::std::option::Option::Some(::std::string::String::new()); } self.designer.as_mut().unwrap() } // Take field pub fn take_designer(&mut self) -> ::std::string::String { self.designer.take().unwrap_or_else(|| ::std::string::String::new()) } // required string license = 3; pub fn license(&self) -> &str { match self.license.as_ref() { Some(v) => v, None => "", } } pub fn clear_license(&mut self) { self.license = ::std::option::Option::None; } pub fn has_license(&self) -> bool { self.license.is_some() } // Param is passed by value, moved pub fn set_license(&mut self, v: ::std::string::String) { self.license = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_license(&mut self) -> &mut ::std::string::String { if self.license.is_none() { self.license = ::std::option::Option::Some(::std::string::String::new()); } self.license.as_mut().unwrap() } // Take field pub fn take_license(&mut self) -> ::std::string::String { self.license.take().unwrap_or_else(|| ::std::string::String::new()) } // required string date_added = 5; pub fn date_added(&self) -> &str { match self.date_added.as_ref() { Some(v) => v, None => "", } } pub fn clear_date_added(&mut self) { self.date_added = ::std::option::Option::None; } pub fn has_date_added(&self) -> bool { self.date_added.is_some() } // Param is passed by value, moved pub fn set_date_added(&mut self, v: ::std::string::String) { self.date_added = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_date_added(&mut self) -> &mut ::std::string::String { if self.date_added.is_none() { self.date_added = ::std::option::Option::Some(::std::string::String::new()); } self.date_added.as_mut().unwrap() } // Take field pub fn take_date_added(&mut self) -> ::std::string::String { self.date_added.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string ttf_autohint_args = 9; pub fn ttf_autohint_args(&self) -> &str { match self.ttf_autohint_args.as_ref() { Some(v) => v, None => "", } } pub fn clear_ttf_autohint_args(&mut self) { self.ttf_autohint_args = ::std::option::Option::None; } pub fn has_ttf_autohint_args(&self) -> bool { self.ttf_autohint_args.is_some() } // Param is passed by value, moved pub fn set_ttf_autohint_args(&mut self, v: ::std::string::String) { self.ttf_autohint_args = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_ttf_autohint_args(&mut self) -> &mut ::std::string::String { if self.ttf_autohint_args.is_none() { self.ttf_autohint_args = ::std::option::Option::Some(::std::string::String::new()); } self.ttf_autohint_args.as_mut().unwrap() } // Take field pub fn take_ttf_autohint_args(&mut self) -> ::std::string::String { self.ttf_autohint_args.take().unwrap_or_else(|| ::std::string::String::new()) } // optional bool is_noto = 13; pub fn is_noto(&self) -> bool { self.is_noto.unwrap_or(false) } pub fn clear_is_noto(&mut self) { self.is_noto = ::std::option::Option::None; } pub fn has_is_noto(&self) -> bool { self.is_noto.is_some() } // Param is passed by value, moved pub fn set_is_noto(&mut self, v: bool) { self.is_noto = ::std::option::Option::Some(v); } // optional string display_name = 18; pub fn display_name(&self) -> &str { match self.display_name.as_ref() { Some(v) => v, None => "", } } pub fn clear_display_name(&mut self) { self.display_name = ::std::option::Option::None; } pub fn has_display_name(&self) -> bool { self.display_name.is_some() } // Param is passed by value, moved pub fn set_display_name(&mut self, v: ::std::string::String) { self.display_name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_display_name(&mut self) -> &mut ::std::string::String { if self.display_name.is_none() { self.display_name = ::std::option::Option::Some(::std::string::String::new()); } self.display_name.as_mut().unwrap() } // Take field pub fn take_display_name(&mut self) -> ::std::string::String { self.display_name.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string minisite_url = 20; pub fn minisite_url(&self) -> &str { match self.minisite_url.as_ref() { Some(v) => v, None => "", } } pub fn clear_minisite_url(&mut self) { self.minisite_url = ::std::option::Option::None; } pub fn has_minisite_url(&self) -> bool { self.minisite_url.is_some() } // Param is passed by value, moved pub fn set_minisite_url(&mut self, v: ::std::string::String) { self.minisite_url = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_minisite_url(&mut self) -> &mut ::std::string::String { if self.minisite_url.is_none() { self.minisite_url = ::std::option::Option::Some(::std::string::String::new()); } self.minisite_url.as_mut().unwrap() } // Take field pub fn take_minisite_url(&mut self) -> ::std::string::String { self.minisite_url.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string primary_script = 21; pub fn primary_script(&self) -> &str { match self.primary_script.as_ref() { Some(v) => v, None => "", } } pub fn clear_primary_script(&mut self) { self.primary_script = ::std::option::Option::None; } pub fn has_primary_script(&self) -> bool { self.primary_script.is_some() } // Param is passed by value, moved pub fn set_primary_script(&mut self, v: ::std::string::String) { self.primary_script = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_primary_script(&mut self) -> &mut ::std::string::String { if self.primary_script.is_none() { self.primary_script = ::std::option::Option::Some(::std::string::String::new()); } self.primary_script.as_mut().unwrap() } // Take field pub fn take_primary_script(&mut self) -> ::std::string::String { self.primary_script.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string primary_language = 22; pub fn primary_language(&self) -> &str { match self.primary_language.as_ref() { Some(v) => v, None => "", } } pub fn clear_primary_language(&mut self) { self.primary_language = ::std::option::Option::None; } pub fn has_primary_language(&self) -> bool { self.primary_language.is_some() } // Param is passed by value, moved pub fn set_primary_language(&mut self, v: ::std::string::String) { self.primary_language = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_primary_language(&mut self) -> &mut ::std::string::String { if self.primary_language.is_none() { self.primary_language = ::std::option::Option::Some(::std::string::String::new()); } self.primary_language.as_mut().unwrap() } // Take field pub fn take_primary_language(&mut self) -> ::std::string::String { self.primary_language.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string stroke = 23; pub fn stroke(&self) -> &str { match self.stroke.as_ref() { Some(v) => v, None => "", } } pub fn clear_stroke(&mut self) { self.stroke = ::std::option::Option::None; } pub fn has_stroke(&self) -> bool { self.stroke.is_some() } // Param is passed by value, moved pub fn set_stroke(&mut self, v: ::std::string::String) { self.stroke = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_stroke(&mut self) -> &mut ::std::string::String { if self.stroke.is_none() { self.stroke = ::std::option::Option::Some(::std::string::String::new()); } self.stroke.as_mut().unwrap() } // Take field pub fn take_stroke(&mut self) -> ::std::string::String { self.stroke.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(24); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "name", |m: &FamilyProto| { &m.name }, |m: &mut FamilyProto| { &mut m.name }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "designer", |m: &FamilyProto| { &m.designer }, |m: &mut FamilyProto| { &mut m.designer }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "license", |m: &FamilyProto| { &m.license }, |m: &mut FamilyProto| { &mut m.license }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "category", |m: &FamilyProto| { &m.category }, |m: &mut FamilyProto| { &mut m.category }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "date_added", |m: &FamilyProto| { &m.date_added }, |m: &mut FamilyProto| { &mut m.date_added }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "fonts", |m: &FamilyProto| { &m.fonts }, |m: &mut FamilyProto| { &mut m.fonts }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "aliases", |m: &FamilyProto| { &m.aliases }, |m: &mut FamilyProto| { &mut m.aliases }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "subsets", |m: &FamilyProto| { &m.subsets }, |m: &mut FamilyProto| { &mut m.subsets }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "ttf_autohint_args", |m: &FamilyProto| { &m.ttf_autohint_args }, |m: &mut FamilyProto| { &mut m.ttf_autohint_args }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "axes", |m: &FamilyProto| { &m.axes }, |m: &mut FamilyProto| { &mut m.axes }, )); fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor_new::<_, _>( "registry_default_overrides", |m: &FamilyProto| { &m.registry_default_overrides }, |m: &mut FamilyProto| { &mut m.registry_default_overrides }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, SourceProto>( "source", |m: &FamilyProto| { &m.source }, |m: &mut FamilyProto| { &mut m.source }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "is_noto", |m: &FamilyProto| { &m.is_noto }, |m: &mut FamilyProto| { &mut m.is_noto }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "languages", |m: &FamilyProto| { &m.languages }, |m: &mut FamilyProto| { &mut m.languages }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "fallbacks", |m: &FamilyProto| { &m.fallbacks }, |m: &mut FamilyProto| { &mut m.fallbacks }, )); fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor_new::<_, _>( "sample_glyphs", |m: &FamilyProto| { &m.sample_glyphs }, |m: &mut FamilyProto| { &mut m.sample_glyphs }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, SampleTextProto>( "sample_text", |m: &FamilyProto| { &m.sample_text }, |m: &mut FamilyProto| { &mut m.sample_text }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "display_name", |m: &FamilyProto| { &m.display_name }, |m: &mut FamilyProto| { &mut m.display_name }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "ordered_sample_glyphs", |m: &FamilyProto| { &m.ordered_sample_glyphs }, |m: &mut FamilyProto| { &mut m.ordered_sample_glyphs }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "minisite_url", |m: &FamilyProto| { &m.minisite_url }, |m: &mut FamilyProto| { &mut m.minisite_url }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "primary_script", |m: &FamilyProto| { &m.primary_script }, |m: &mut FamilyProto| { &mut m.primary_script }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "primary_language", |m: &FamilyProto| { &m.primary_language }, |m: &mut FamilyProto| { &mut m.primary_language }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "stroke", |m: &FamilyProto| { &m.stroke }, |m: &mut FamilyProto| { &mut m.stroke }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "classifications", |m: &FamilyProto| { &m.classifications }, |m: &mut FamilyProto| { &mut m.classifications }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "FamilyProto", fields, oneofs, ) } } impl ::protobuf::Message for FamilyProto { const NAME: &'static str = "FamilyProto"; fn is_initialized(&self) -> bool { if self.name.is_none() { return false; } if self.designer.is_none() { return false; } if self.license.is_none() { return false; } if self.date_added.is_none() { return false; } for v in &self.fonts { if !v.is_initialized() { return false; } }; for v in &self.axes { if !v.is_initialized() { return false; } }; // TODO: check map values are initialized for v in &self.source { if !v.is_initialized() { return false; } }; for v in &self.fallbacks { if !v.is_initialized() { return false; } }; // TODO: check map values are initialized for v in &self.sample_text { if !v.is_initialized() { return false; } }; for v in &self.ordered_sample_glyphs { if !v.is_initialized() { return false; } }; true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.name = ::std::option::Option::Some(is.read_string()?); }, 18 => { self.designer = ::std::option::Option::Some(is.read_string()?); }, 26 => { self.license = ::std::option::Option::Some(is.read_string()?); }, 34 => { self.category.push(is.read_string()?); }, 42 => { self.date_added = ::std::option::Option::Some(is.read_string()?); }, 50 => { self.fonts.push(is.read_message()?); }, 58 => { self.aliases.push(is.read_string()?); }, 66 => { self.subsets.push(is.read_string()?); }, 74 => { self.ttf_autohint_args = ::std::option::Option::Some(is.read_string()?); }, 82 => { self.axes.push(is.read_message()?); }, 90 => { let len = is.read_raw_varint32()?; let old_limit = is.push_limit(len as u64)?; let mut key = ::std::default::Default::default(); let mut value = ::std::default::Default::default(); while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => key = is.read_string()?, 21 => value = is.read_float()?, _ => ::protobuf::rt::skip_field_for_tag(tag, is)?, }; } is.pop_limit(old_limit); self.registry_default_overrides.insert(key, value); }, 98 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.source)?; }, 104 => { self.is_noto = ::std::option::Option::Some(is.read_bool()?); }, 114 => { self.languages.push(is.read_string()?); }, 122 => { self.fallbacks.push(is.read_message()?); }, 130 => { let len = is.read_raw_varint32()?; let old_limit = is.push_limit(len as u64)?; let mut key = ::std::default::Default::default(); let mut value = ::std::default::Default::default(); while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => key = is.read_string()?, 18 => value = is.read_string()?, _ => ::protobuf::rt::skip_field_for_tag(tag, is)?, }; } is.pop_limit(old_limit); self.sample_glyphs.insert(key, value); }, 138 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.sample_text)?; }, 146 => { self.display_name = ::std::option::Option::Some(is.read_string()?); }, 154 => { self.ordered_sample_glyphs.push(is.read_message()?); }, 162 => { self.minisite_url = ::std::option::Option::Some(is.read_string()?); }, 170 => { self.primary_script = ::std::option::Option::Some(is.read_string()?); }, 178 => { self.primary_language = ::std::option::Option::Some(is.read_string()?); }, 186 => { self.stroke = ::std::option::Option::Some(is.read_string()?); }, 202 => { self.classifications.push(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.name.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.designer.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } if let Some(v) = self.license.as_ref() { my_size += ::protobuf::rt::string_size(3, &v); } for value in &self.category { my_size += ::protobuf::rt::string_size(4, &value); }; if let Some(v) = self.date_added.as_ref() { my_size += ::protobuf::rt::string_size(5, &v); } for value in &self.fonts { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; for value in &self.aliases { my_size += ::protobuf::rt::string_size(7, &value); }; for value in &self.subsets { my_size += ::protobuf::rt::string_size(8, &value); }; if let Some(v) = self.ttf_autohint_args.as_ref() { my_size += ::protobuf::rt::string_size(9, &v); } for value in &self.axes { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; for (k, v) in &self.registry_default_overrides { let mut entry_size = 0; entry_size += ::protobuf::rt::string_size(1, &k); entry_size += 1 + 4; my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size }; if let Some(v) = self.source.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let Some(v) = self.is_noto { my_size += 1 + 1; } for value in &self.languages { my_size += ::protobuf::rt::string_size(14, &value); }; for value in &self.fallbacks { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; for (k, v) in &self.sample_glyphs { let mut entry_size = 0; entry_size += ::protobuf::rt::string_size(1, &k); entry_size += ::protobuf::rt::string_size(2, &v); my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size }; if let Some(v) = self.sample_text.as_ref() { let len = v.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let Some(v) = self.display_name.as_ref() { my_size += ::protobuf::rt::string_size(18, &v); } for value in &self.ordered_sample_glyphs { let len = value.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; if let Some(v) = self.minisite_url.as_ref() { my_size += ::protobuf::rt::string_size(20, &v); } if let Some(v) = self.primary_script.as_ref() { my_size += ::protobuf::rt::string_size(21, &v); } if let Some(v) = self.primary_language.as_ref() { my_size += ::protobuf::rt::string_size(22, &v); } if let Some(v) = self.stroke.as_ref() { my_size += ::protobuf::rt::string_size(23, &v); } for value in &self.classifications { my_size += ::protobuf::rt::string_size(25, &value); }; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.name.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.designer.as_ref() { os.write_string(2, v)?; } if let Some(v) = self.license.as_ref() { os.write_string(3, v)?; } for v in &self.category { os.write_string(4, &v)?; }; if let Some(v) = self.date_added.as_ref() { os.write_string(5, v)?; } for v in &self.fonts { ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; }; for v in &self.aliases { os.write_string(7, &v)?; }; for v in &self.subsets { os.write_string(8, &v)?; }; if let Some(v) = self.ttf_autohint_args.as_ref() { os.write_string(9, v)?; } for v in &self.axes { ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?; }; for (k, v) in &self.registry_default_overrides { let mut entry_size = 0; entry_size += ::protobuf::rt::string_size(1, &k); entry_size += 1 + 4; os.write_raw_varint32(90)?; // Tag. os.write_raw_varint32(entry_size as u32)?; os.write_string(1, &k)?; os.write_float(2, *v)?; }; if let Some(v) = self.source.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(12, v, os)?; } if let Some(v) = self.is_noto { os.write_bool(13, v)?; } for v in &self.languages { os.write_string(14, &v)?; }; for v in &self.fallbacks { ::protobuf::rt::write_message_field_with_cached_size(15, v, os)?; }; for (k, v) in &self.sample_glyphs { let mut entry_size = 0; entry_size += ::protobuf::rt::string_size(1, &k); entry_size += ::protobuf::rt::string_size(2, &v); os.write_raw_varint32(130)?; // Tag. os.write_raw_varint32(entry_size as u32)?; os.write_string(1, &k)?; os.write_string(2, &v)?; }; if let Some(v) = self.sample_text.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(17, v, os)?; } if let Some(v) = self.display_name.as_ref() { os.write_string(18, v)?; } for v in &self.ordered_sample_glyphs { ::protobuf::rt::write_message_field_with_cached_size(19, v, os)?; }; if let Some(v) = self.minisite_url.as_ref() { os.write_string(20, v)?; } if let Some(v) = self.primary_script.as_ref() { os.write_string(21, v)?; } if let Some(v) = self.primary_language.as_ref() { os.write_string(22, v)?; } if let Some(v) = self.stroke.as_ref() { os.write_string(23, v)?; } for v in &self.classifications { os.write_string(25, &v)?; }; os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> FamilyProto { FamilyProto::new() } fn clear(&mut self) { self.name = ::std::option::Option::None; self.designer = ::std::option::Option::None; self.license = ::std::option::Option::None; self.category.clear(); self.date_added = ::std::option::Option::None; self.fonts.clear(); self.aliases.clear(); self.subsets.clear(); self.ttf_autohint_args = ::std::option::Option::None; self.axes.clear(); self.registry_default_overrides.clear(); self.source.clear(); self.is_noto = ::std::option::Option::None; self.languages.clear(); self.fallbacks.clear(); self.sample_glyphs.clear(); self.sample_text.clear(); self.display_name = ::std::option::Option::None; self.ordered_sample_glyphs.clear(); self.minisite_url = ::std::option::Option::None; self.primary_script = ::std::option::Option::None; self.primary_language = ::std::option::Option::None; self.stroke = ::std::option::Option::None; self.classifications.clear(); self.special_fields.clear(); } fn default_instance() -> &'static FamilyProto { static instance: ::protobuf::rt::Lazy = ::protobuf::rt::Lazy::new(); instance.get(FamilyProto::new) } } impl ::protobuf::MessageFull for FamilyProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("FamilyProto").unwrap()).clone() } } impl ::std::fmt::Display for FamilyProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for FamilyProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:google.fonts_public.FontProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct FontProto { // message fields // @@protoc_insertion_point(field:google.fonts_public.FontProto.name) pub name: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.FontProto.style) pub style: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.FontProto.weight) pub weight: ::std::option::Option, // @@protoc_insertion_point(field:google.fonts_public.FontProto.filename) pub filename: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.FontProto.post_script_name) pub post_script_name: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.FontProto.full_name) pub full_name: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.FontProto.copyright) pub copyright: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:google.fonts_public.FontProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a FontProto { fn default() -> &'a FontProto { ::default_instance() } } impl FontProto { pub fn new() -> FontProto { ::std::default::Default::default() } // required string name = 1; pub fn name(&self) -> &str { match self.name.as_ref() { Some(v) => v, None => "", } } pub fn clear_name(&mut self) { self.name = ::std::option::Option::None; } pub fn has_name(&self) -> bool { self.name.is_some() } // Param is passed by value, moved pub fn set_name(&mut self, v: ::std::string::String) { self.name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_name(&mut self) -> &mut ::std::string::String { if self.name.is_none() { self.name = ::std::option::Option::Some(::std::string::String::new()); } self.name.as_mut().unwrap() } // Take field pub fn take_name(&mut self) -> ::std::string::String { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } // required string style = 2; pub fn style(&self) -> &str { match self.style.as_ref() { Some(v) => v, None => "", } } pub fn clear_style(&mut self) { self.style = ::std::option::Option::None; } pub fn has_style(&self) -> bool { self.style.is_some() } // Param is passed by value, moved pub fn set_style(&mut self, v: ::std::string::String) { self.style = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_style(&mut self) -> &mut ::std::string::String { if self.style.is_none() { self.style = ::std::option::Option::Some(::std::string::String::new()); } self.style.as_mut().unwrap() } // Take field pub fn take_style(&mut self) -> ::std::string::String { self.style.take().unwrap_or_else(|| ::std::string::String::new()) } // required int32 weight = 3; pub fn weight(&self) -> i32 { self.weight.unwrap_or(0) } pub fn clear_weight(&mut self) { self.weight = ::std::option::Option::None; } pub fn has_weight(&self) -> bool { self.weight.is_some() } // Param is passed by value, moved pub fn set_weight(&mut self, v: i32) { self.weight = ::std::option::Option::Some(v); } // required string filename = 4; pub fn filename(&self) -> &str { match self.filename.as_ref() { Some(v) => v, None => "", } } pub fn clear_filename(&mut self) { self.filename = ::std::option::Option::None; } pub fn has_filename(&self) -> bool { self.filename.is_some() } // Param is passed by value, moved pub fn set_filename(&mut self, v: ::std::string::String) { self.filename = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_filename(&mut self) -> &mut ::std::string::String { if self.filename.is_none() { self.filename = ::std::option::Option::Some(::std::string::String::new()); } self.filename.as_mut().unwrap() } // Take field pub fn take_filename(&mut self) -> ::std::string::String { self.filename.take().unwrap_or_else(|| ::std::string::String::new()) } // required string post_script_name = 5; pub fn post_script_name(&self) -> &str { match self.post_script_name.as_ref() { Some(v) => v, None => "", } } pub fn clear_post_script_name(&mut self) { self.post_script_name = ::std::option::Option::None; } pub fn has_post_script_name(&self) -> bool { self.post_script_name.is_some() } // Param is passed by value, moved pub fn set_post_script_name(&mut self, v: ::std::string::String) { self.post_script_name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_post_script_name(&mut self) -> &mut ::std::string::String { if self.post_script_name.is_none() { self.post_script_name = ::std::option::Option::Some(::std::string::String::new()); } self.post_script_name.as_mut().unwrap() } // Take field pub fn take_post_script_name(&mut self) -> ::std::string::String { self.post_script_name.take().unwrap_or_else(|| ::std::string::String::new()) } // required string full_name = 6; pub fn full_name(&self) -> &str { match self.full_name.as_ref() { Some(v) => v, None => "", } } pub fn clear_full_name(&mut self) { self.full_name = ::std::option::Option::None; } pub fn has_full_name(&self) -> bool { self.full_name.is_some() } // Param is passed by value, moved pub fn set_full_name(&mut self, v: ::std::string::String) { self.full_name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_full_name(&mut self) -> &mut ::std::string::String { if self.full_name.is_none() { self.full_name = ::std::option::Option::Some(::std::string::String::new()); } self.full_name.as_mut().unwrap() } // Take field pub fn take_full_name(&mut self) -> ::std::string::String { self.full_name.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string copyright = 7; pub fn copyright(&self) -> &str { match self.copyright.as_ref() { Some(v) => v, None => "", } } pub fn clear_copyright(&mut self) { self.copyright = ::std::option::Option::None; } pub fn has_copyright(&self) -> bool { self.copyright.is_some() } // Param is passed by value, moved pub fn set_copyright(&mut self, v: ::std::string::String) { self.copyright = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_copyright(&mut self) -> &mut ::std::string::String { if self.copyright.is_none() { self.copyright = ::std::option::Option::Some(::std::string::String::new()); } self.copyright.as_mut().unwrap() } // Take field pub fn take_copyright(&mut self) -> ::std::string::String { self.copyright.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(7); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "name", |m: &FontProto| { &m.name }, |m: &mut FontProto| { &mut m.name }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "style", |m: &FontProto| { &m.style }, |m: &mut FontProto| { &mut m.style }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "weight", |m: &FontProto| { &m.weight }, |m: &mut FontProto| { &mut m.weight }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "filename", |m: &FontProto| { &m.filename }, |m: &mut FontProto| { &mut m.filename }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "post_script_name", |m: &FontProto| { &m.post_script_name }, |m: &mut FontProto| { &mut m.post_script_name }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "full_name", |m: &FontProto| { &m.full_name }, |m: &mut FontProto| { &mut m.full_name }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "copyright", |m: &FontProto| { &m.copyright }, |m: &mut FontProto| { &mut m.copyright }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "FontProto", fields, oneofs, ) } } impl ::protobuf::Message for FontProto { const NAME: &'static str = "FontProto"; fn is_initialized(&self) -> bool { if self.name.is_none() { return false; } if self.style.is_none() { return false; } if self.weight.is_none() { return false; } if self.filename.is_none() { return false; } if self.post_script_name.is_none() { return false; } if self.full_name.is_none() { return false; } true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.name = ::std::option::Option::Some(is.read_string()?); }, 18 => { self.style = ::std::option::Option::Some(is.read_string()?); }, 24 => { self.weight = ::std::option::Option::Some(is.read_int32()?); }, 34 => { self.filename = ::std::option::Option::Some(is.read_string()?); }, 42 => { self.post_script_name = ::std::option::Option::Some(is.read_string()?); }, 50 => { self.full_name = ::std::option::Option::Some(is.read_string()?); }, 58 => { self.copyright = ::std::option::Option::Some(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.name.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.style.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } if let Some(v) = self.weight { my_size += ::protobuf::rt::int32_size(3, v); } if let Some(v) = self.filename.as_ref() { my_size += ::protobuf::rt::string_size(4, &v); } if let Some(v) = self.post_script_name.as_ref() { my_size += ::protobuf::rt::string_size(5, &v); } if let Some(v) = self.full_name.as_ref() { my_size += ::protobuf::rt::string_size(6, &v); } if let Some(v) = self.copyright.as_ref() { my_size += ::protobuf::rt::string_size(7, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.name.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.style.as_ref() { os.write_string(2, v)?; } if let Some(v) = self.weight { os.write_int32(3, v)?; } if let Some(v) = self.filename.as_ref() { os.write_string(4, v)?; } if let Some(v) = self.post_script_name.as_ref() { os.write_string(5, v)?; } if let Some(v) = self.full_name.as_ref() { os.write_string(6, v)?; } if let Some(v) = self.copyright.as_ref() { os.write_string(7, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> FontProto { FontProto::new() } fn clear(&mut self) { self.name = ::std::option::Option::None; self.style = ::std::option::Option::None; self.weight = ::std::option::Option::None; self.filename = ::std::option::Option::None; self.post_script_name = ::std::option::Option::None; self.full_name = ::std::option::Option::None; self.copyright = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static FontProto { static instance: FontProto = FontProto { name: ::std::option::Option::None, style: ::std::option::Option::None, weight: ::std::option::Option::None, filename: ::std::option::Option::None, post_script_name: ::std::option::Option::None, full_name: ::std::option::Option::None, copyright: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for FontProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("FontProto").unwrap()).clone() } } impl ::std::fmt::Display for FontProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for FontProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:google.fonts_public.AxisSegmentProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct AxisSegmentProto { // message fields // @@protoc_insertion_point(field:google.fonts_public.AxisSegmentProto.tag) pub tag: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.AxisSegmentProto.min_value) pub min_value: ::std::option::Option, // @@protoc_insertion_point(field:google.fonts_public.AxisSegmentProto.max_value) pub max_value: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:google.fonts_public.AxisSegmentProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a AxisSegmentProto { fn default() -> &'a AxisSegmentProto { ::default_instance() } } impl AxisSegmentProto { pub fn new() -> AxisSegmentProto { ::std::default::Default::default() } // optional string tag = 1; pub fn tag(&self) -> &str { match self.tag.as_ref() { Some(v) => v, None => "", } } pub fn clear_tag(&mut self) { self.tag = ::std::option::Option::None; } pub fn has_tag(&self) -> bool { self.tag.is_some() } // Param is passed by value, moved pub fn set_tag(&mut self, v: ::std::string::String) { self.tag = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_tag(&mut self) -> &mut ::std::string::String { if self.tag.is_none() { self.tag = ::std::option::Option::Some(::std::string::String::new()); } self.tag.as_mut().unwrap() } // Take field pub fn take_tag(&mut self) -> ::std::string::String { self.tag.take().unwrap_or_else(|| ::std::string::String::new()) } // optional float min_value = 2; pub fn min_value(&self) -> f32 { self.min_value.unwrap_or(0.) } pub fn clear_min_value(&mut self) { self.min_value = ::std::option::Option::None; } pub fn has_min_value(&self) -> bool { self.min_value.is_some() } // Param is passed by value, moved pub fn set_min_value(&mut self, v: f32) { self.min_value = ::std::option::Option::Some(v); } // optional float max_value = 4; pub fn max_value(&self) -> f32 { self.max_value.unwrap_or(0.) } pub fn clear_max_value(&mut self) { self.max_value = ::std::option::Option::None; } pub fn has_max_value(&self) -> bool { self.max_value.is_some() } // Param is passed by value, moved pub fn set_max_value(&mut self, v: f32) { self.max_value = ::std::option::Option::Some(v); } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(3); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "tag", |m: &AxisSegmentProto| { &m.tag }, |m: &mut AxisSegmentProto| { &mut m.tag }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "min_value", |m: &AxisSegmentProto| { &m.min_value }, |m: &mut AxisSegmentProto| { &mut m.min_value }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "max_value", |m: &AxisSegmentProto| { &m.max_value }, |m: &mut AxisSegmentProto| { &mut m.max_value }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "AxisSegmentProto", fields, oneofs, ) } } impl ::protobuf::Message for AxisSegmentProto { const NAME: &'static str = "AxisSegmentProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.tag = ::std::option::Option::Some(is.read_string()?); }, 21 => { self.min_value = ::std::option::Option::Some(is.read_float()?); }, 37 => { self.max_value = ::std::option::Option::Some(is.read_float()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.tag.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.min_value { my_size += 1 + 4; } if let Some(v) = self.max_value { my_size += 1 + 4; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.tag.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.min_value { os.write_float(2, v)?; } if let Some(v) = self.max_value { os.write_float(4, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> AxisSegmentProto { AxisSegmentProto::new() } fn clear(&mut self) { self.tag = ::std::option::Option::None; self.min_value = ::std::option::Option::None; self.max_value = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static AxisSegmentProto { static instance: AxisSegmentProto = AxisSegmentProto { tag: ::std::option::Option::None, min_value: ::std::option::Option::None, max_value: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for AxisSegmentProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("AxisSegmentProto").unwrap()).clone() } } impl ::std::fmt::Display for AxisSegmentProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for AxisSegmentProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:google.fonts_public.SourceProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct SourceProto { // message fields // @@protoc_insertion_point(field:google.fonts_public.SourceProto.repository_url) pub repository_url: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SourceProto.branch) pub branch: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SourceProto.commit) pub commit: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SourceProto.archive_url) pub archive_url: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SourceProto.config_yaml) pub config_yaml: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SourceProto.files) pub files: ::std::vec::Vec, // special fields // @@protoc_insertion_point(special_field:google.fonts_public.SourceProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a SourceProto { fn default() -> &'a SourceProto { ::default_instance() } } impl SourceProto { pub fn new() -> SourceProto { ::std::default::Default::default() } // optional string repository_url = 1; pub fn repository_url(&self) -> &str { match self.repository_url.as_ref() { Some(v) => v, None => "", } } pub fn clear_repository_url(&mut self) { self.repository_url = ::std::option::Option::None; } pub fn has_repository_url(&self) -> bool { self.repository_url.is_some() } // Param is passed by value, moved pub fn set_repository_url(&mut self, v: ::std::string::String) { self.repository_url = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_repository_url(&mut self) -> &mut ::std::string::String { if self.repository_url.is_none() { self.repository_url = ::std::option::Option::Some(::std::string::String::new()); } self.repository_url.as_mut().unwrap() } // Take field pub fn take_repository_url(&mut self) -> ::std::string::String { self.repository_url.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string branch = 5; pub fn branch(&self) -> &str { match self.branch.as_ref() { Some(v) => v, None => "", } } pub fn clear_branch(&mut self) { self.branch = ::std::option::Option::None; } pub fn has_branch(&self) -> bool { self.branch.is_some() } // Param is passed by value, moved pub fn set_branch(&mut self, v: ::std::string::String) { self.branch = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_branch(&mut self) -> &mut ::std::string::String { if self.branch.is_none() { self.branch = ::std::option::Option::Some(::std::string::String::new()); } self.branch.as_mut().unwrap() } // Take field pub fn take_branch(&mut self) -> ::std::string::String { self.branch.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string commit = 2; pub fn commit(&self) -> &str { match self.commit.as_ref() { Some(v) => v, None => "", } } pub fn clear_commit(&mut self) { self.commit = ::std::option::Option::None; } pub fn has_commit(&self) -> bool { self.commit.is_some() } // Param is passed by value, moved pub fn set_commit(&mut self, v: ::std::string::String) { self.commit = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_commit(&mut self) -> &mut ::std::string::String { if self.commit.is_none() { self.commit = ::std::option::Option::Some(::std::string::String::new()); } self.commit.as_mut().unwrap() } // Take field pub fn take_commit(&mut self) -> ::std::string::String { self.commit.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string archive_url = 3; pub fn archive_url(&self) -> &str { match self.archive_url.as_ref() { Some(v) => v, None => "", } } pub fn clear_archive_url(&mut self) { self.archive_url = ::std::option::Option::None; } pub fn has_archive_url(&self) -> bool { self.archive_url.is_some() } // Param is passed by value, moved pub fn set_archive_url(&mut self, v: ::std::string::String) { self.archive_url = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_archive_url(&mut self) -> &mut ::std::string::String { if self.archive_url.is_none() { self.archive_url = ::std::option::Option::Some(::std::string::String::new()); } self.archive_url.as_mut().unwrap() } // Take field pub fn take_archive_url(&mut self) -> ::std::string::String { self.archive_url.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string config_yaml = 6; pub fn config_yaml(&self) -> &str { match self.config_yaml.as_ref() { Some(v) => v, None => "", } } pub fn clear_config_yaml(&mut self) { self.config_yaml = ::std::option::Option::None; } pub fn has_config_yaml(&self) -> bool { self.config_yaml.is_some() } // Param is passed by value, moved pub fn set_config_yaml(&mut self, v: ::std::string::String) { self.config_yaml = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_config_yaml(&mut self) -> &mut ::std::string::String { if self.config_yaml.is_none() { self.config_yaml = ::std::option::Option::Some(::std::string::String::new()); } self.config_yaml.as_mut().unwrap() } // Take field pub fn take_config_yaml(&mut self) -> ::std::string::String { self.config_yaml.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(6); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "repository_url", |m: &SourceProto| { &m.repository_url }, |m: &mut SourceProto| { &mut m.repository_url }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "branch", |m: &SourceProto| { &m.branch }, |m: &mut SourceProto| { &mut m.branch }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "commit", |m: &SourceProto| { &m.commit }, |m: &mut SourceProto| { &mut m.commit }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "archive_url", |m: &SourceProto| { &m.archive_url }, |m: &mut SourceProto| { &mut m.archive_url }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "config_yaml", |m: &SourceProto| { &m.config_yaml }, |m: &mut SourceProto| { &mut m.config_yaml }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "files", |m: &SourceProto| { &m.files }, |m: &mut SourceProto| { &mut m.files }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "SourceProto", fields, oneofs, ) } } impl ::protobuf::Message for SourceProto { const NAME: &'static str = "SourceProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.repository_url = ::std::option::Option::Some(is.read_string()?); }, 42 => { self.branch = ::std::option::Option::Some(is.read_string()?); }, 18 => { self.commit = ::std::option::Option::Some(is.read_string()?); }, 26 => { self.archive_url = ::std::option::Option::Some(is.read_string()?); }, 50 => { self.config_yaml = ::std::option::Option::Some(is.read_string()?); }, 34 => { self.files.push(is.read_message()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.repository_url.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.branch.as_ref() { my_size += ::protobuf::rt::string_size(5, &v); } if let Some(v) = self.commit.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } if let Some(v) = self.archive_url.as_ref() { my_size += ::protobuf::rt::string_size(3, &v); } if let Some(v) = self.config_yaml.as_ref() { my_size += ::protobuf::rt::string_size(6, &v); } for value in &self.files { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.repository_url.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.branch.as_ref() { os.write_string(5, v)?; } if let Some(v) = self.commit.as_ref() { os.write_string(2, v)?; } if let Some(v) = self.archive_url.as_ref() { os.write_string(3, v)?; } if let Some(v) = self.config_yaml.as_ref() { os.write_string(6, v)?; } for v in &self.files { ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; }; os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> SourceProto { SourceProto::new() } fn clear(&mut self) { self.repository_url = ::std::option::Option::None; self.branch = ::std::option::Option::None; self.commit = ::std::option::Option::None; self.archive_url = ::std::option::Option::None; self.config_yaml = ::std::option::Option::None; self.files.clear(); self.special_fields.clear(); } fn default_instance() -> &'static SourceProto { static instance: SourceProto = SourceProto { repository_url: ::std::option::Option::None, branch: ::std::option::Option::None, commit: ::std::option::Option::None, archive_url: ::std::option::Option::None, config_yaml: ::std::option::Option::None, files: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for SourceProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("SourceProto").unwrap()).clone() } } impl ::std::fmt::Display for SourceProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for SourceProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// A file to take from source and where to put it in dest /// Ex web/split/Roboto[wdth,wght].ttf => Roboto[wdth,wght].ttf // @@protoc_insertion_point(message:google.fonts_public.SourceFileProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct SourceFileProto { // message fields // @@protoc_insertion_point(field:google.fonts_public.SourceFileProto.source_file) pub source_file: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SourceFileProto.dest_file) pub dest_file: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:google.fonts_public.SourceFileProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a SourceFileProto { fn default() -> &'a SourceFileProto { ::default_instance() } } impl SourceFileProto { pub fn new() -> SourceFileProto { ::std::default::Default::default() } // optional string source_file = 1; pub fn source_file(&self) -> &str { match self.source_file.as_ref() { Some(v) => v, None => "", } } pub fn clear_source_file(&mut self) { self.source_file = ::std::option::Option::None; } pub fn has_source_file(&self) -> bool { self.source_file.is_some() } // Param is passed by value, moved pub fn set_source_file(&mut self, v: ::std::string::String) { self.source_file = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_source_file(&mut self) -> &mut ::std::string::String { if self.source_file.is_none() { self.source_file = ::std::option::Option::Some(::std::string::String::new()); } self.source_file.as_mut().unwrap() } // Take field pub fn take_source_file(&mut self) -> ::std::string::String { self.source_file.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string dest_file = 2; pub fn dest_file(&self) -> &str { match self.dest_file.as_ref() { Some(v) => v, None => "", } } pub fn clear_dest_file(&mut self) { self.dest_file = ::std::option::Option::None; } pub fn has_dest_file(&self) -> bool { self.dest_file.is_some() } // Param is passed by value, moved pub fn set_dest_file(&mut self, v: ::std::string::String) { self.dest_file = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_dest_file(&mut self) -> &mut ::std::string::String { if self.dest_file.is_none() { self.dest_file = ::std::option::Option::Some(::std::string::String::new()); } self.dest_file.as_mut().unwrap() } // Take field pub fn take_dest_file(&mut self) -> ::std::string::String { self.dest_file.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(2); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "source_file", |m: &SourceFileProto| { &m.source_file }, |m: &mut SourceFileProto| { &mut m.source_file }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "dest_file", |m: &SourceFileProto| { &m.dest_file }, |m: &mut SourceFileProto| { &mut m.dest_file }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "SourceFileProto", fields, oneofs, ) } } impl ::protobuf::Message for SourceFileProto { const NAME: &'static str = "SourceFileProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.source_file = ::std::option::Option::Some(is.read_string()?); }, 18 => { self.dest_file = ::std::option::Option::Some(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.source_file.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.dest_file.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.source_file.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.dest_file.as_ref() { os.write_string(2, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> SourceFileProto { SourceFileProto::new() } fn clear(&mut self) { self.source_file = ::std::option::Option::None; self.dest_file = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static SourceFileProto { static instance: SourceFileProto = SourceFileProto { source_file: ::std::option::Option::None, dest_file: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for SourceFileProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("SourceFileProto").unwrap()).clone() } } impl ::std::fmt::Display for SourceFileProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for SourceFileProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// Message so we can add additional fields like value in future // @@protoc_insertion_point(message:google.fonts_public.TargetProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct TargetProto { // message fields // @@protoc_insertion_point(field:google.fonts_public.TargetProto.target_type) pub target_type: ::std::option::Option<::protobuf::EnumOrUnknown>, // special fields // @@protoc_insertion_point(special_field:google.fonts_public.TargetProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a TargetProto { fn default() -> &'a TargetProto { ::default_instance() } } impl TargetProto { pub fn new() -> TargetProto { ::std::default::Default::default() } // optional .google.fonts_public.TargetTypeProto target_type = 1; pub fn target_type(&self) -> TargetTypeProto { match self.target_type { Some(e) => e.enum_value_or(TargetTypeProto::TARGET_UNSPECIFIED), None => TargetTypeProto::TARGET_UNSPECIFIED, } } pub fn clear_target_type(&mut self) { self.target_type = ::std::option::Option::None; } pub fn has_target_type(&self) -> bool { self.target_type.is_some() } // Param is passed by value, moved pub fn set_target_type(&mut self, v: TargetTypeProto) { self.target_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "target_type", |m: &TargetProto| { &m.target_type }, |m: &mut TargetProto| { &mut m.target_type }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "TargetProto", fields, oneofs, ) } } impl ::protobuf::Message for TargetProto { const NAME: &'static str = "TargetProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 8 => { self.target_type = ::std::option::Option::Some(is.read_enum_or_unknown()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.target_type { my_size += ::protobuf::rt::int32_size(1, v.value()); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.target_type { os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> TargetProto { TargetProto::new() } fn clear(&mut self) { self.target_type = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static TargetProto { static instance: TargetProto = TargetProto { target_type: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for TargetProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("TargetProto").unwrap()).clone() } } impl ::std::fmt::Display for TargetProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for TargetProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:google.fonts_public.FamilyFallbackProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct FamilyFallbackProto { // message fields // @@protoc_insertion_point(field:google.fonts_public.FamilyFallbackProto.axis_target) pub axis_target: ::std::vec::Vec, // @@protoc_insertion_point(field:google.fonts_public.FamilyFallbackProto.target) pub target: ::std::vec::Vec, // @@protoc_insertion_point(field:google.fonts_public.FamilyFallbackProto.size_adjust_pct) pub size_adjust_pct: ::std::option::Option, // @@protoc_insertion_point(field:google.fonts_public.FamilyFallbackProto.ascent_override_pct) pub ascent_override_pct: ::std::option::Option, // @@protoc_insertion_point(field:google.fonts_public.FamilyFallbackProto.local_src) pub local_src: ::std::vec::Vec<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:google.fonts_public.FamilyFallbackProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a FamilyFallbackProto { fn default() -> &'a FamilyFallbackProto { ::default_instance() } } impl FamilyFallbackProto { pub fn new() -> FamilyFallbackProto { ::std::default::Default::default() } // optional float size_adjust_pct = 3; pub fn size_adjust_pct(&self) -> f32 { self.size_adjust_pct.unwrap_or(0.) } pub fn clear_size_adjust_pct(&mut self) { self.size_adjust_pct = ::std::option::Option::None; } pub fn has_size_adjust_pct(&self) -> bool { self.size_adjust_pct.is_some() } // Param is passed by value, moved pub fn set_size_adjust_pct(&mut self, v: f32) { self.size_adjust_pct = ::std::option::Option::Some(v); } // optional float ascent_override_pct = 5; pub fn ascent_override_pct(&self) -> f32 { self.ascent_override_pct.unwrap_or(0.) } pub fn clear_ascent_override_pct(&mut self) { self.ascent_override_pct = ::std::option::Option::None; } pub fn has_ascent_override_pct(&self) -> bool { self.ascent_override_pct.is_some() } // Param is passed by value, moved pub fn set_ascent_override_pct(&mut self, v: f32) { self.ascent_override_pct = ::std::option::Option::Some(v); } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(5); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "axis_target", |m: &FamilyFallbackProto| { &m.axis_target }, |m: &mut FamilyFallbackProto| { &mut m.axis_target }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "target", |m: &FamilyFallbackProto| { &m.target }, |m: &mut FamilyFallbackProto| { &mut m.target }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "size_adjust_pct", |m: &FamilyFallbackProto| { &m.size_adjust_pct }, |m: &mut FamilyFallbackProto| { &mut m.size_adjust_pct }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "ascent_override_pct", |m: &FamilyFallbackProto| { &m.ascent_override_pct }, |m: &mut FamilyFallbackProto| { &mut m.ascent_override_pct }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "local_src", |m: &FamilyFallbackProto| { &m.local_src }, |m: &mut FamilyFallbackProto| { &mut m.local_src }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "FamilyFallbackProto", fields, oneofs, ) } } impl ::protobuf::Message for FamilyFallbackProto { const NAME: &'static str = "FamilyFallbackProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.axis_target.push(is.read_message()?); }, 18 => { self.target.push(is.read_message()?); }, 29 => { self.size_adjust_pct = ::std::option::Option::Some(is.read_float()?); }, 45 => { self.ascent_override_pct = ::std::option::Option::Some(is.read_float()?); }, 34 => { self.local_src.push(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.axis_target { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; for value in &self.target { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; if let Some(v) = self.size_adjust_pct { my_size += 1 + 4; } if let Some(v) = self.ascent_override_pct { my_size += 1 + 4; } for value in &self.local_src { my_size += ::protobuf::rt::string_size(4, &value); }; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.axis_target { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }; for v in &self.target { ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; }; if let Some(v) = self.size_adjust_pct { os.write_float(3, v)?; } if let Some(v) = self.ascent_override_pct { os.write_float(5, v)?; } for v in &self.local_src { os.write_string(4, &v)?; }; os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> FamilyFallbackProto { FamilyFallbackProto::new() } fn clear(&mut self) { self.axis_target.clear(); self.target.clear(); self.size_adjust_pct = ::std::option::Option::None; self.ascent_override_pct = ::std::option::Option::None; self.local_src.clear(); self.special_fields.clear(); } fn default_instance() -> &'static FamilyFallbackProto { static instance: FamilyFallbackProto = FamilyFallbackProto { axis_target: ::std::vec::Vec::new(), target: ::std::vec::Vec::new(), size_adjust_pct: ::std::option::Option::None, ascent_override_pct: ::std::option::Option::None, local_src: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for FamilyFallbackProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("FamilyFallbackProto").unwrap()).clone() } } impl ::std::fmt::Display for FamilyFallbackProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for FamilyFallbackProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// Corresponds to SampleTextProto in /// google3/java/com/google/fonts/backend/spanner/google_fonts_proto.proto // @@protoc_insertion_point(message:google.fonts_public.SampleTextProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct SampleTextProto { // message fields // @@protoc_insertion_point(field:google.fonts_public.SampleTextProto.masthead_full) pub masthead_full: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SampleTextProto.masthead_partial) pub masthead_partial: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SampleTextProto.styles) pub styles: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SampleTextProto.tester) pub tester: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SampleTextProto.poster_sm) pub poster_sm: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SampleTextProto.poster_md) pub poster_md: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SampleTextProto.poster_lg) pub poster_lg: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SampleTextProto.specimen_48) pub specimen_48: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SampleTextProto.specimen_36) pub specimen_36: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SampleTextProto.specimen_32) pub specimen_32: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SampleTextProto.specimen_21) pub specimen_21: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SampleTextProto.specimen_16) pub specimen_16: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.SampleTextProto.note) pub note: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:google.fonts_public.SampleTextProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a SampleTextProto { fn default() -> &'a SampleTextProto { ::default_instance() } } impl SampleTextProto { pub fn new() -> SampleTextProto { ::std::default::Default::default() } // optional string masthead_full = 1; pub fn masthead_full(&self) -> &str { match self.masthead_full.as_ref() { Some(v) => v, None => "", } } pub fn clear_masthead_full(&mut self) { self.masthead_full = ::std::option::Option::None; } pub fn has_masthead_full(&self) -> bool { self.masthead_full.is_some() } // Param is passed by value, moved pub fn set_masthead_full(&mut self, v: ::std::string::String) { self.masthead_full = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_masthead_full(&mut self) -> &mut ::std::string::String { if self.masthead_full.is_none() { self.masthead_full = ::std::option::Option::Some(::std::string::String::new()); } self.masthead_full.as_mut().unwrap() } // Take field pub fn take_masthead_full(&mut self) -> ::std::string::String { self.masthead_full.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string masthead_partial = 2; pub fn masthead_partial(&self) -> &str { match self.masthead_partial.as_ref() { Some(v) => v, None => "", } } pub fn clear_masthead_partial(&mut self) { self.masthead_partial = ::std::option::Option::None; } pub fn has_masthead_partial(&self) -> bool { self.masthead_partial.is_some() } // Param is passed by value, moved pub fn set_masthead_partial(&mut self, v: ::std::string::String) { self.masthead_partial = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_masthead_partial(&mut self) -> &mut ::std::string::String { if self.masthead_partial.is_none() { self.masthead_partial = ::std::option::Option::Some(::std::string::String::new()); } self.masthead_partial.as_mut().unwrap() } // Take field pub fn take_masthead_partial(&mut self) -> ::std::string::String { self.masthead_partial.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string styles = 3; pub fn styles(&self) -> &str { match self.styles.as_ref() { Some(v) => v, None => "", } } pub fn clear_styles(&mut self) { self.styles = ::std::option::Option::None; } pub fn has_styles(&self) -> bool { self.styles.is_some() } // Param is passed by value, moved pub fn set_styles(&mut self, v: ::std::string::String) { self.styles = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_styles(&mut self) -> &mut ::std::string::String { if self.styles.is_none() { self.styles = ::std::option::Option::Some(::std::string::String::new()); } self.styles.as_mut().unwrap() } // Take field pub fn take_styles(&mut self) -> ::std::string::String { self.styles.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string tester = 4; pub fn tester(&self) -> &str { match self.tester.as_ref() { Some(v) => v, None => "", } } pub fn clear_tester(&mut self) { self.tester = ::std::option::Option::None; } pub fn has_tester(&self) -> bool { self.tester.is_some() } // Param is passed by value, moved pub fn set_tester(&mut self, v: ::std::string::String) { self.tester = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_tester(&mut self) -> &mut ::std::string::String { if self.tester.is_none() { self.tester = ::std::option::Option::Some(::std::string::String::new()); } self.tester.as_mut().unwrap() } // Take field pub fn take_tester(&mut self) -> ::std::string::String { self.tester.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string poster_sm = 5; pub fn poster_sm(&self) -> &str { match self.poster_sm.as_ref() { Some(v) => v, None => "", } } pub fn clear_poster_sm(&mut self) { self.poster_sm = ::std::option::Option::None; } pub fn has_poster_sm(&self) -> bool { self.poster_sm.is_some() } // Param is passed by value, moved pub fn set_poster_sm(&mut self, v: ::std::string::String) { self.poster_sm = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_poster_sm(&mut self) -> &mut ::std::string::String { if self.poster_sm.is_none() { self.poster_sm = ::std::option::Option::Some(::std::string::String::new()); } self.poster_sm.as_mut().unwrap() } // Take field pub fn take_poster_sm(&mut self) -> ::std::string::String { self.poster_sm.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string poster_md = 6; pub fn poster_md(&self) -> &str { match self.poster_md.as_ref() { Some(v) => v, None => "", } } pub fn clear_poster_md(&mut self) { self.poster_md = ::std::option::Option::None; } pub fn has_poster_md(&self) -> bool { self.poster_md.is_some() } // Param is passed by value, moved pub fn set_poster_md(&mut self, v: ::std::string::String) { self.poster_md = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_poster_md(&mut self) -> &mut ::std::string::String { if self.poster_md.is_none() { self.poster_md = ::std::option::Option::Some(::std::string::String::new()); } self.poster_md.as_mut().unwrap() } // Take field pub fn take_poster_md(&mut self) -> ::std::string::String { self.poster_md.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string poster_lg = 7; pub fn poster_lg(&self) -> &str { match self.poster_lg.as_ref() { Some(v) => v, None => "", } } pub fn clear_poster_lg(&mut self) { self.poster_lg = ::std::option::Option::None; } pub fn has_poster_lg(&self) -> bool { self.poster_lg.is_some() } // Param is passed by value, moved pub fn set_poster_lg(&mut self, v: ::std::string::String) { self.poster_lg = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_poster_lg(&mut self) -> &mut ::std::string::String { if self.poster_lg.is_none() { self.poster_lg = ::std::option::Option::Some(::std::string::String::new()); } self.poster_lg.as_mut().unwrap() } // Take field pub fn take_poster_lg(&mut self) -> ::std::string::String { self.poster_lg.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string specimen_48 = 8; pub fn specimen_48(&self) -> &str { match self.specimen_48.as_ref() { Some(v) => v, None => "", } } pub fn clear_specimen_48(&mut self) { self.specimen_48 = ::std::option::Option::None; } pub fn has_specimen_48(&self) -> bool { self.specimen_48.is_some() } // Param is passed by value, moved pub fn set_specimen_48(&mut self, v: ::std::string::String) { self.specimen_48 = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_specimen_48(&mut self) -> &mut ::std::string::String { if self.specimen_48.is_none() { self.specimen_48 = ::std::option::Option::Some(::std::string::String::new()); } self.specimen_48.as_mut().unwrap() } // Take field pub fn take_specimen_48(&mut self) -> ::std::string::String { self.specimen_48.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string specimen_36 = 9; pub fn specimen_36(&self) -> &str { match self.specimen_36.as_ref() { Some(v) => v, None => "", } } pub fn clear_specimen_36(&mut self) { self.specimen_36 = ::std::option::Option::None; } pub fn has_specimen_36(&self) -> bool { self.specimen_36.is_some() } // Param is passed by value, moved pub fn set_specimen_36(&mut self, v: ::std::string::String) { self.specimen_36 = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_specimen_36(&mut self) -> &mut ::std::string::String { if self.specimen_36.is_none() { self.specimen_36 = ::std::option::Option::Some(::std::string::String::new()); } self.specimen_36.as_mut().unwrap() } // Take field pub fn take_specimen_36(&mut self) -> ::std::string::String { self.specimen_36.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string specimen_32 = 10; pub fn specimen_32(&self) -> &str { match self.specimen_32.as_ref() { Some(v) => v, None => "", } } pub fn clear_specimen_32(&mut self) { self.specimen_32 = ::std::option::Option::None; } pub fn has_specimen_32(&self) -> bool { self.specimen_32.is_some() } // Param is passed by value, moved pub fn set_specimen_32(&mut self, v: ::std::string::String) { self.specimen_32 = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_specimen_32(&mut self) -> &mut ::std::string::String { if self.specimen_32.is_none() { self.specimen_32 = ::std::option::Option::Some(::std::string::String::new()); } self.specimen_32.as_mut().unwrap() } // Take field pub fn take_specimen_32(&mut self) -> ::std::string::String { self.specimen_32.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string specimen_21 = 11; pub fn specimen_21(&self) -> &str { match self.specimen_21.as_ref() { Some(v) => v, None => "", } } pub fn clear_specimen_21(&mut self) { self.specimen_21 = ::std::option::Option::None; } pub fn has_specimen_21(&self) -> bool { self.specimen_21.is_some() } // Param is passed by value, moved pub fn set_specimen_21(&mut self, v: ::std::string::String) { self.specimen_21 = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_specimen_21(&mut self) -> &mut ::std::string::String { if self.specimen_21.is_none() { self.specimen_21 = ::std::option::Option::Some(::std::string::String::new()); } self.specimen_21.as_mut().unwrap() } // Take field pub fn take_specimen_21(&mut self) -> ::std::string::String { self.specimen_21.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string specimen_16 = 12; pub fn specimen_16(&self) -> &str { match self.specimen_16.as_ref() { Some(v) => v, None => "", } } pub fn clear_specimen_16(&mut self) { self.specimen_16 = ::std::option::Option::None; } pub fn has_specimen_16(&self) -> bool { self.specimen_16.is_some() } // Param is passed by value, moved pub fn set_specimen_16(&mut self, v: ::std::string::String) { self.specimen_16 = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_specimen_16(&mut self) -> &mut ::std::string::String { if self.specimen_16.is_none() { self.specimen_16 = ::std::option::Option::Some(::std::string::String::new()); } self.specimen_16.as_mut().unwrap() } // Take field pub fn take_specimen_16(&mut self) -> ::std::string::String { self.specimen_16.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string note = 13; pub fn note(&self) -> &str { match self.note.as_ref() { Some(v) => v, None => "", } } pub fn clear_note(&mut self) { self.note = ::std::option::Option::None; } pub fn has_note(&self) -> bool { self.note.is_some() } // Param is passed by value, moved pub fn set_note(&mut self, v: ::std::string::String) { self.note = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_note(&mut self) -> &mut ::std::string::String { if self.note.is_none() { self.note = ::std::option::Option::Some(::std::string::String::new()); } self.note.as_mut().unwrap() } // Take field pub fn take_note(&mut self) -> ::std::string::String { self.note.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(13); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "masthead_full", |m: &SampleTextProto| { &m.masthead_full }, |m: &mut SampleTextProto| { &mut m.masthead_full }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "masthead_partial", |m: &SampleTextProto| { &m.masthead_partial }, |m: &mut SampleTextProto| { &mut m.masthead_partial }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "styles", |m: &SampleTextProto| { &m.styles }, |m: &mut SampleTextProto| { &mut m.styles }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "tester", |m: &SampleTextProto| { &m.tester }, |m: &mut SampleTextProto| { &mut m.tester }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "poster_sm", |m: &SampleTextProto| { &m.poster_sm }, |m: &mut SampleTextProto| { &mut m.poster_sm }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "poster_md", |m: &SampleTextProto| { &m.poster_md }, |m: &mut SampleTextProto| { &mut m.poster_md }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "poster_lg", |m: &SampleTextProto| { &m.poster_lg }, |m: &mut SampleTextProto| { &mut m.poster_lg }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "specimen_48", |m: &SampleTextProto| { &m.specimen_48 }, |m: &mut SampleTextProto| { &mut m.specimen_48 }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "specimen_36", |m: &SampleTextProto| { &m.specimen_36 }, |m: &mut SampleTextProto| { &mut m.specimen_36 }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "specimen_32", |m: &SampleTextProto| { &m.specimen_32 }, |m: &mut SampleTextProto| { &mut m.specimen_32 }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "specimen_21", |m: &SampleTextProto| { &m.specimen_21 }, |m: &mut SampleTextProto| { &mut m.specimen_21 }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "specimen_16", |m: &SampleTextProto| { &m.specimen_16 }, |m: &mut SampleTextProto| { &mut m.specimen_16 }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "note", |m: &SampleTextProto| { &m.note }, |m: &mut SampleTextProto| { &mut m.note }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "SampleTextProto", fields, oneofs, ) } } impl ::protobuf::Message for SampleTextProto { const NAME: &'static str = "SampleTextProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.masthead_full = ::std::option::Option::Some(is.read_string()?); }, 18 => { self.masthead_partial = ::std::option::Option::Some(is.read_string()?); }, 26 => { self.styles = ::std::option::Option::Some(is.read_string()?); }, 34 => { self.tester = ::std::option::Option::Some(is.read_string()?); }, 42 => { self.poster_sm = ::std::option::Option::Some(is.read_string()?); }, 50 => { self.poster_md = ::std::option::Option::Some(is.read_string()?); }, 58 => { self.poster_lg = ::std::option::Option::Some(is.read_string()?); }, 66 => { self.specimen_48 = ::std::option::Option::Some(is.read_string()?); }, 74 => { self.specimen_36 = ::std::option::Option::Some(is.read_string()?); }, 82 => { self.specimen_32 = ::std::option::Option::Some(is.read_string()?); }, 90 => { self.specimen_21 = ::std::option::Option::Some(is.read_string()?); }, 98 => { self.specimen_16 = ::std::option::Option::Some(is.read_string()?); }, 106 => { self.note = ::std::option::Option::Some(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.masthead_full.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.masthead_partial.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } if let Some(v) = self.styles.as_ref() { my_size += ::protobuf::rt::string_size(3, &v); } if let Some(v) = self.tester.as_ref() { my_size += ::protobuf::rt::string_size(4, &v); } if let Some(v) = self.poster_sm.as_ref() { my_size += ::protobuf::rt::string_size(5, &v); } if let Some(v) = self.poster_md.as_ref() { my_size += ::protobuf::rt::string_size(6, &v); } if let Some(v) = self.poster_lg.as_ref() { my_size += ::protobuf::rt::string_size(7, &v); } if let Some(v) = self.specimen_48.as_ref() { my_size += ::protobuf::rt::string_size(8, &v); } if let Some(v) = self.specimen_36.as_ref() { my_size += ::protobuf::rt::string_size(9, &v); } if let Some(v) = self.specimen_32.as_ref() { my_size += ::protobuf::rt::string_size(10, &v); } if let Some(v) = self.specimen_21.as_ref() { my_size += ::protobuf::rt::string_size(11, &v); } if let Some(v) = self.specimen_16.as_ref() { my_size += ::protobuf::rt::string_size(12, &v); } if let Some(v) = self.note.as_ref() { my_size += ::protobuf::rt::string_size(13, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.masthead_full.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.masthead_partial.as_ref() { os.write_string(2, v)?; } if let Some(v) = self.styles.as_ref() { os.write_string(3, v)?; } if let Some(v) = self.tester.as_ref() { os.write_string(4, v)?; } if let Some(v) = self.poster_sm.as_ref() { os.write_string(5, v)?; } if let Some(v) = self.poster_md.as_ref() { os.write_string(6, v)?; } if let Some(v) = self.poster_lg.as_ref() { os.write_string(7, v)?; } if let Some(v) = self.specimen_48.as_ref() { os.write_string(8, v)?; } if let Some(v) = self.specimen_36.as_ref() { os.write_string(9, v)?; } if let Some(v) = self.specimen_32.as_ref() { os.write_string(10, v)?; } if let Some(v) = self.specimen_21.as_ref() { os.write_string(11, v)?; } if let Some(v) = self.specimen_16.as_ref() { os.write_string(12, v)?; } if let Some(v) = self.note.as_ref() { os.write_string(13, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> SampleTextProto { SampleTextProto::new() } fn clear(&mut self) { self.masthead_full = ::std::option::Option::None; self.masthead_partial = ::std::option::Option::None; self.styles = ::std::option::Option::None; self.tester = ::std::option::Option::None; self.poster_sm = ::std::option::Option::None; self.poster_md = ::std::option::Option::None; self.poster_lg = ::std::option::Option::None; self.specimen_48 = ::std::option::Option::None; self.specimen_36 = ::std::option::Option::None; self.specimen_32 = ::std::option::Option::None; self.specimen_21 = ::std::option::Option::None; self.specimen_16 = ::std::option::Option::None; self.note = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static SampleTextProto { static instance: SampleTextProto = SampleTextProto { masthead_full: ::std::option::Option::None, masthead_partial: ::std::option::Option::None, styles: ::std::option::Option::None, tester: ::std::option::Option::None, poster_sm: ::std::option::Option::None, poster_md: ::std::option::Option::None, poster_lg: ::std::option::Option::None, specimen_48: ::std::option::Option::None, specimen_36: ::std::option::Option::None, specimen_32: ::std::option::Option::None, specimen_21: ::std::option::Option::None, specimen_16: ::std::option::Option::None, note: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for SampleTextProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("SampleTextProto").unwrap()).clone() } } impl ::std::fmt::Display for SampleTextProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for SampleTextProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:google.fonts_public.GlyphGroupProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct GlyphGroupProto { // message fields // @@protoc_insertion_point(field:google.fonts_public.GlyphGroupProto.name) pub name: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.fonts_public.GlyphGroupProto.glyphs) pub glyphs: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:google.fonts_public.GlyphGroupProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a GlyphGroupProto { fn default() -> &'a GlyphGroupProto { ::default_instance() } } impl GlyphGroupProto { pub fn new() -> GlyphGroupProto { ::std::default::Default::default() } // optional string name = 1; pub fn name(&self) -> &str { match self.name.as_ref() { Some(v) => v, None => "", } } pub fn clear_name(&mut self) { self.name = ::std::option::Option::None; } pub fn has_name(&self) -> bool { self.name.is_some() } // Param is passed by value, moved pub fn set_name(&mut self, v: ::std::string::String) { self.name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_name(&mut self) -> &mut ::std::string::String { if self.name.is_none() { self.name = ::std::option::Option::Some(::std::string::String::new()); } self.name.as_mut().unwrap() } // Take field pub fn take_name(&mut self) -> ::std::string::String { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string glyphs = 2; pub fn glyphs(&self) -> &str { match self.glyphs.as_ref() { Some(v) => v, None => "", } } pub fn clear_glyphs(&mut self) { self.glyphs = ::std::option::Option::None; } pub fn has_glyphs(&self) -> bool { self.glyphs.is_some() } // Param is passed by value, moved pub fn set_glyphs(&mut self, v: ::std::string::String) { self.glyphs = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_glyphs(&mut self) -> &mut ::std::string::String { if self.glyphs.is_none() { self.glyphs = ::std::option::Option::Some(::std::string::String::new()); } self.glyphs.as_mut().unwrap() } // Take field pub fn take_glyphs(&mut self) -> ::std::string::String { self.glyphs.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(2); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "name", |m: &GlyphGroupProto| { &m.name }, |m: &mut GlyphGroupProto| { &mut m.name }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "glyphs", |m: &GlyphGroupProto| { &m.glyphs }, |m: &mut GlyphGroupProto| { &mut m.glyphs }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "GlyphGroupProto", fields, oneofs, ) } } impl ::protobuf::Message for GlyphGroupProto { const NAME: &'static str = "GlyphGroupProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.name = ::std::option::Option::Some(is.read_string()?); }, 18 => { self.glyphs = ::std::option::Option::Some(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.name.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.glyphs.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.name.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.glyphs.as_ref() { os.write_string(2, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> GlyphGroupProto { GlyphGroupProto::new() } fn clear(&mut self) { self.name = ::std::option::Option::None; self.glyphs = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static GlyphGroupProto { static instance: GlyphGroupProto = GlyphGroupProto { name: ::std::option::Option::None, glyphs: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for GlyphGroupProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("GlyphGroupProto").unwrap()).clone() } } impl ::std::fmt::Display for GlyphGroupProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for GlyphGroupProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] // @@protoc_insertion_point(enum:google.fonts_public.TargetTypeProto) pub enum TargetTypeProto { // @@protoc_insertion_point(enum_value:google.fonts_public.TargetTypeProto.TARGET_UNSPECIFIED) TARGET_UNSPECIFIED = 0, // @@protoc_insertion_point(enum_value:google.fonts_public.TargetTypeProto.TARGET_OS_WINDOWS) TARGET_OS_WINDOWS = 1, // @@protoc_insertion_point(enum_value:google.fonts_public.TargetTypeProto.TARGET_OS_MAC) TARGET_OS_MAC = 2, // @@protoc_insertion_point(enum_value:google.fonts_public.TargetTypeProto.TARGET_OS_LINUX) TARGET_OS_LINUX = 3, // @@protoc_insertion_point(enum_value:google.fonts_public.TargetTypeProto.TARGET_OS_ANDROID) TARGET_OS_ANDROID = 4, // @@protoc_insertion_point(enum_value:google.fonts_public.TargetTypeProto.TARGET_OS_IOS) TARGET_OS_IOS = 5, } impl ::protobuf::Enum for TargetTypeProto { const NAME: &'static str = "TargetTypeProto"; fn value(&self) -> i32 { *self as i32 } fn from_i32(value: i32) -> ::std::option::Option { match value { 0 => ::std::option::Option::Some(TargetTypeProto::TARGET_UNSPECIFIED), 1 => ::std::option::Option::Some(TargetTypeProto::TARGET_OS_WINDOWS), 2 => ::std::option::Option::Some(TargetTypeProto::TARGET_OS_MAC), 3 => ::std::option::Option::Some(TargetTypeProto::TARGET_OS_LINUX), 4 => ::std::option::Option::Some(TargetTypeProto::TARGET_OS_ANDROID), 5 => ::std::option::Option::Some(TargetTypeProto::TARGET_OS_IOS), _ => ::std::option::Option::None } } fn from_str(str: &str) -> ::std::option::Option { match str { "TARGET_UNSPECIFIED" => ::std::option::Option::Some(TargetTypeProto::TARGET_UNSPECIFIED), "TARGET_OS_WINDOWS" => ::std::option::Option::Some(TargetTypeProto::TARGET_OS_WINDOWS), "TARGET_OS_MAC" => ::std::option::Option::Some(TargetTypeProto::TARGET_OS_MAC), "TARGET_OS_LINUX" => ::std::option::Option::Some(TargetTypeProto::TARGET_OS_LINUX), "TARGET_OS_ANDROID" => ::std::option::Option::Some(TargetTypeProto::TARGET_OS_ANDROID), "TARGET_OS_IOS" => ::std::option::Option::Some(TargetTypeProto::TARGET_OS_IOS), _ => ::std::option::Option::None } } const VALUES: &'static [TargetTypeProto] = &[ TargetTypeProto::TARGET_UNSPECIFIED, TargetTypeProto::TARGET_OS_WINDOWS, TargetTypeProto::TARGET_OS_MAC, TargetTypeProto::TARGET_OS_LINUX, TargetTypeProto::TARGET_OS_ANDROID, TargetTypeProto::TARGET_OS_IOS, ]; } impl ::protobuf::EnumFull for TargetTypeProto { fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().enum_by_package_relative_name("TargetTypeProto").unwrap()).clone() } fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { let index = *self as usize; Self::enum_descriptor().value_by_index(index) } } impl ::std::default::Default for TargetTypeProto { fn default() -> Self { TargetTypeProto::TARGET_UNSPECIFIED } } impl TargetTypeProto { fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { ::protobuf::reflect::GeneratedEnumDescriptorData::new::("TargetTypeProto") } } static file_descriptor_proto_data: &'static [u8] = b"\ \n\x12fonts_public.proto\x12\x13google.fonts_public\"\xfc\t\n\x0bFamilyP\ roto\x12\x12\n\x04name\x18\x01\x20\x02(\tR\x04name\x12\x1a\n\x08designer\ \x18\x02\x20\x02(\tR\x08designer\x12\x18\n\x07license\x18\x03\x20\x02(\t\ R\x07license\x12\x1a\n\x08category\x18\x04\x20\x03(\tR\x08category\x12\ \x1d\n\ndate_added\x18\x05\x20\x02(\tR\tdateAdded\x124\n\x05fonts\x18\ \x06\x20\x03(\x0b2\x1e.google.fonts_public.FontProtoR\x05fonts\x12\x18\n\ \x07aliases\x18\x07\x20\x03(\tR\x07aliases\x12\x18\n\x07subsets\x18\x08\ \x20\x03(\tR\x07subsets\x12*\n\x11ttf_autohint_args\x18\t\x20\x01(\tR\ \x0fttfAutohintArgs\x129\n\x04axes\x18\n\x20\x03(\x0b2%.google.fonts_pub\ lic.AxisSegmentProtoR\x04axes\x12|\n\x1aregistry_default_overrides\x18\ \x0b\x20\x03(\x0b2>.google.fonts_public.FamilyProto.RegistryDefaultOverr\ idesEntryR\x18registryDefaultOverrides\x128\n\x06source\x18\x0c\x20\x01(\ \x0b2\x20.google.fonts_public.SourceProtoR\x06source\x12\x17\n\x07is_not\ o\x18\r\x20\x01(\x08R\x06isNoto\x12\x1c\n\tlanguages\x18\x0e\x20\x03(\tR\ \tlanguages\x12F\n\tfallbacks\x18\x0f\x20\x03(\x0b2(.google.fonts_public\ .FamilyFallbackProtoR\tfallbacks\x12W\n\rsample_glyphs\x18\x10\x20\x03(\ \x0b22.google.fonts_public.FamilyProto.SampleGlyphsEntryR\x0csampleGlyph\ s\x12E\n\x0bsample_text\x18\x11\x20\x01(\x0b2$.google.fonts_public.Sampl\ eTextProtoR\nsampleText\x12!\n\x0cdisplay_name\x18\x12\x20\x01(\tR\x0bdi\ splayName\x12X\n\x15ordered_sample_glyphs\x18\x13\x20\x03(\x0b2$.google.\ fonts_public.GlyphGroupProtoR\x13orderedSampleGlyphs\x12!\n\x0cminisite_\ url\x18\x14\x20\x01(\tR\x0bminisiteUrl\x12%\n\x0eprimary_script\x18\x15\ \x20\x01(\tR\rprimaryScript\x12)\n\x10primary_language\x18\x16\x20\x01(\ \tR\x0fprimaryLanguage\x12\x16\n\x06stroke\x18\x17\x20\x01(\tR\x06stroke\ \x12(\n\x0fclassifications\x18\x19\x20\x03(\tR\x0fclassifications\x1aK\n\ \x1dRegistryDefaultOverridesEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\ \x03key\x12\x14\n\x05value\x18\x02\x20\x01(\x02R\x05value:\x028\x01\x1a?\ \n\x11SampleGlyphsEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\ \x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x028\x01\"\xce\x01\n\tFont\ Proto\x12\x12\n\x04name\x18\x01\x20\x02(\tR\x04name\x12\x14\n\x05style\ \x18\x02\x20\x02(\tR\x05style\x12\x16\n\x06weight\x18\x03\x20\x02(\x05R\ \x06weight\x12\x1a\n\x08filename\x18\x04\x20\x02(\tR\x08filename\x12(\n\ \x10post_script_name\x18\x05\x20\x02(\tR\x0epostScriptName\x12\x1b\n\tfu\ ll_name\x18\x06\x20\x02(\tR\x08fullName\x12\x1c\n\tcopyright\x18\x07\x20\ \x01(\tR\tcopyright\"s\n\x10AxisSegmentProto\x12\x10\n\x03tag\x18\x01\ \x20\x01(\tR\x03tag\x12\x1b\n\tmin_value\x18\x02\x20\x01(\x02R\x08minVal\ ue\x12\x1b\n\tmax_value\x18\x04\x20\x01(\x02R\x08maxValueJ\x04\x08\x03\ \x10\x04R\rdefault_value\"\xe2\x01\n\x0bSourceProto\x12%\n\x0erepository\ _url\x18\x01\x20\x01(\tR\rrepositoryUrl\x12\x16\n\x06branch\x18\x05\x20\ \x01(\tR\x06branch\x12\x16\n\x06commit\x18\x02\x20\x01(\tR\x06commit\x12\ \x1f\n\x0barchive_url\x18\x03\x20\x01(\tR\narchiveUrl\x12\x1f\n\x0bconfi\ g_yaml\x18\x06\x20\x01(\tR\nconfigYaml\x12:\n\x05files\x18\x04\x20\x03(\ \x0b2$.google.fonts_public.SourceFileProtoR\x05files\"O\n\x0fSourceFileP\ roto\x12\x1f\n\x0bsource_file\x18\x01\x20\x01(\tR\nsourceFile\x12\x1b\n\ \tdest_file\x18\x02\x20\x01(\tR\x08destFile\"T\n\x0bTargetProto\x12E\n\ \x0btarget_type\x18\x01\x20\x01(\x0e2$.google.fonts_public.TargetTypePro\ toR\ntargetType\"\x8c\x02\n\x13FamilyFallbackProto\x12F\n\x0baxis_target\ \x18\x01\x20\x03(\x0b2%.google.fonts_public.AxisSegmentProtoR\naxisTarge\ t\x128\n\x06target\x18\x02\x20\x03(\x0b2\x20.google.fonts_public.TargetP\ rotoR\x06target\x12&\n\x0fsize_adjust_pct\x18\x03\x20\x01(\x02R\rsizeAdj\ ustPct\x12.\n\x13ascent_override_pct\x18\x05\x20\x01(\x02R\x11ascentOver\ ridePct\x12\x1b\n\tlocal_src\x18\x04\x20\x03(\tR\x08localSrc\"\xa1\x03\n\ \x0fSampleTextProto\x12#\n\rmasthead_full\x18\x01\x20\x01(\tR\x0cmasthea\ dFull\x12)\n\x10masthead_partial\x18\x02\x20\x01(\tR\x0fmastheadPartial\ \x12\x16\n\x06styles\x18\x03\x20\x01(\tR\x06styles\x12\x16\n\x06tester\ \x18\x04\x20\x01(\tR\x06tester\x12\x1b\n\tposter_sm\x18\x05\x20\x01(\tR\ \x08posterSm\x12\x1b\n\tposter_md\x18\x06\x20\x01(\tR\x08posterMd\x12\ \x1b\n\tposter_lg\x18\x07\x20\x01(\tR\x08posterLg\x12\x1f\n\x0bspecimen_\ 48\x18\x08\x20\x01(\tR\nspecimen48\x12\x1f\n\x0bspecimen_36\x18\t\x20\ \x01(\tR\nspecimen36\x12\x1f\n\x0bspecimen_32\x18\n\x20\x01(\tR\nspecime\ n32\x12\x1f\n\x0bspecimen_21\x18\x0b\x20\x01(\tR\nspecimen21\x12\x1f\n\ \x0bspecimen_16\x18\x0c\x20\x01(\tR\nspecimen16\x12\x12\n\x04note\x18\r\ \x20\x01(\tR\x04note\"=\n\x0fGlyphGroupProto\x12\x12\n\x04name\x18\x01\ \x20\x01(\tR\x04name\x12\x16\n\x06glyphs\x18\x02\x20\x01(\tR\x06glyphs*\ \x92\x01\n\x0fTargetTypeProto\x12\x16\n\x12TARGET_UNSPECIFIED\x10\0\x12\ \x15\n\x11TARGET_OS_WINDOWS\x10\x01\x12\x11\n\rTARGET_OS_MAC\x10\x02\x12\ \x13\n\x0fTARGET_OS_LINUX\x10\x03\x12\x15\n\x11TARGET_OS_ANDROID\x10\x04\ \x12\x11\n\rTARGET_OS_IOS\x10\x05B%\n\x16com.google.fonts.protoB\x0bFont\ sPublicJ\xe63\n\x07\x12\x05\0\0\x8e\x01\x01\n\x08\n\x01\x0c\x12\x03\0\0\ \x12\n8\n\x01\x02\x12\x03\x05\0\x1c\x1a.*\n\x20Open\x20Source'd\x20font\ \x20metadata\x20proto\x20formats.\n\n\x08\n\x01\x08\x12\x03\x07\0/\n\t\n\ \x02\x08\x01\x12\x03\x07\0/\n\x08\n\x01\x08\x12\x03\x08\0,\n\t\n\x02\x08\ \x08\x12\x03\x08\0,\n\n\n\x02\x04\0\x12\x04\n\0:\x01\n\n\n\x03\x04\0\x01\ \x12\x03\n\x08\x13\n\x0b\n\x04\x04\0\x02\0\x12\x03\x0b\x02\x1b\n\x0c\n\ \x05\x04\0\x02\0\x04\x12\x03\x0b\x02\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\ \x03\x0b\x0b\x11\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x0b\x12\x16\n\x0c\n\ \x05\x04\0\x02\0\x03\x12\x03\x0b\x19\x1a\n\x0b\n\x04\x04\0\x02\x01\x12\ \x03\x0c\x02\x1f\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03\x0c\x02\n\n\x0c\n\ \x05\x04\0\x02\x01\x05\x12\x03\x0c\x0b\x11\n\x0c\n\x05\x04\0\x02\x01\x01\ \x12\x03\x0c\x12\x1a\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x0c\x1d\x1e\n\ \x0b\n\x04\x04\0\x02\x02\x12\x03\r\x02\x1e\n\x0c\n\x05\x04\0\x02\x02\x04\ \x12\x03\r\x02\n\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\r\x0b\x11\n\x0c\n\ \x05\x04\0\x02\x02\x01\x12\x03\r\x12\x19\n\x0c\n\x05\x04\0\x02\x02\x03\ \x12\x03\r\x1c\x1d\n\x83\x05\n\x04\x04\0\x02\x03\x12\x03\x1a\x02\x1f\x1a\ \xc6\x04\x20A\x20mutually-exclusive\x20category\x20for\x20each\x20font.\ \x20The\x20categories\x20are:\x20Serif,\n\x20Sans\x20Serif,\x20Display,\ \x20Handwriting\x20and\x20Monospace.\x20Being\x20mutually\x20exclusive\ \x20is\n\x20a\x20significant\x20deficiency\x20as,\x20for\x20example,\x20\ most\x20Display\x20fonts\x20are\x20typically\n\x20Serif\x20or\x20Sans\ \x20Serif\x20and\x20that\x20is\x20not\x20captured.\n\n\x20For\x20searchi\ ng,\x20this\x20field\x20is\x20replaced\x20by\x20stroke\x20and\x20classif\ ications\x20(see\n\x20below),\x20however,\x20this\x20field\x20persists\ \x20(it's\x20required\x20after\x20all)\x20and\x20will\n\x20continue\x20t\ o\x20be\x20populated\x20in\x20the\x20onboarding\x20process.\n\n\x20This\ \x20is\x20repeated\x20field,\x20yet\x20Google\x20Fonts\x20only\x20uses\ \x20the\x20last\x20entry\x20so\n\x20multiple\x20entries\x20should\x20be\ \x20avoided.\n\"-\x20Only\x20the\x20LAST\x20value\x20is\x20used\x20by\ \x20Google\x20Fonts\n\n\x0c\n\x05\x04\0\x02\x03\x04\x12\x03\x1a\x02\n\n\ \x0c\n\x05\x04\0\x02\x03\x05\x12\x03\x1a\x0b\x11\n\x0c\n\x05\x04\0\x02\ \x03\x01\x12\x03\x1a\x12\x1a\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x1a\ \x1d\x1e\n\x0b\n\x04\x04\0\x02\x04\x12\x03\x1b\x02!\n\x0c\n\x05\x04\0\ \x02\x04\x04\x12\x03\x1b\x02\n\n\x0c\n\x05\x04\0\x02\x04\x05\x12\x03\x1b\ \x0b\x11\n\x0c\n\x05\x04\0\x02\x04\x01\x12\x03\x1b\x12\x1c\n\x0c\n\x05\ \x04\0\x02\x04\x03\x12\x03\x1b\x1f\x20\n\x0b\n\x04\x04\0\x02\x05\x12\x03\ \x1c\x02\x1f\n\x0c\n\x05\x04\0\x02\x05\x04\x12\x03\x1c\x02\n\n\x0c\n\x05\ \x04\0\x02\x05\x06\x12\x03\x1c\x0b\x14\n\x0c\n\x05\x04\0\x02\x05\x01\x12\ \x03\x1c\x15\x1a\n\x0c\n\x05\x04\0\x02\x05\x03\x12\x03\x1c\x1d\x1e\n\x0b\ \n\x04\x04\0\x02\x06\x12\x03\x1d\x02\x1e\n\x0c\n\x05\x04\0\x02\x06\x04\ \x12\x03\x1d\x02\n\n\x0c\n\x05\x04\0\x02\x06\x05\x12\x03\x1d\x0b\x11\n\ \x0c\n\x05\x04\0\x02\x06\x01\x12\x03\x1d\x12\x19\n\x0c\n\x05\x04\0\x02\ \x06\x03\x12\x03\x1d\x1c\x1d\n\x0b\n\x04\x04\0\x02\x07\x12\x03\x1e\x02\ \x1e\n\x0c\n\x05\x04\0\x02\x07\x04\x12\x03\x1e\x02\n\n\x0c\n\x05\x04\0\ \x02\x07\x05\x12\x03\x1e\x0b\x11\n\x0c\n\x05\x04\0\x02\x07\x01\x12\x03\ \x1e\x12\x19\n\x0c\n\x05\x04\0\x02\x07\x03\x12\x03\x1e\x1c\x1d\n\x0b\n\ \x04\x04\0\x02\x08\x12\x03\x1f\x02(\n\x0c\n\x05\x04\0\x02\x08\x04\x12\ \x03\x1f\x02\n\n\x0c\n\x05\x04\0\x02\x08\x05\x12\x03\x1f\x0b\x11\n\x0c\n\ \x05\x04\0\x02\x08\x01\x12\x03\x1f\x12#\n\x0c\n\x05\x04\0\x02\x08\x03\ \x12\x03\x1f&'\n\x0b\n\x04\x04\0\x02\t\x12\x03\x20\x02&\n\x0c\n\x05\x04\ \0\x02\t\x04\x12\x03\x20\x02\n\n\x0c\n\x05\x04\0\x02\t\x06\x12\x03\x20\ \x0b\x1b\n\x0c\n\x05\x04\0\x02\t\x01\x12\x03\x20\x1c\x20\n\x0c\n\x05\x04\ \0\x02\t\x03\x12\x03\x20#%\n\x0b\n\x04\x04\0\x02\n\x12\x03!\x025\n\x0c\n\ \x05\x04\0\x02\n\x06\x12\x03!\x02\x14\n\x0c\n\x05\x04\0\x02\n\x01\x12\ \x03!\x15/\n\x0c\n\x05\x04\0\x02\n\x03\x12\x03!24\n\x0b\n\x04\x04\0\x02\ \x0b\x12\x03\"\x02#\n\x0c\n\x05\x04\0\x02\x0b\x04\x12\x03\"\x02\n\n\x0c\ \n\x05\x04\0\x02\x0b\x06\x12\x03\"\x0b\x16\n\x0c\n\x05\x04\0\x02\x0b\x01\ \x12\x03\"\x17\x1d\n\x0c\n\x05\x04\0\x02\x0b\x03\x12\x03\"\x20\"\n\x0b\n\ \x04\x04\0\x02\x0c\x12\x03#\x02\x1d\n\x0c\n\x05\x04\0\x02\x0c\x04\x12\ \x03#\x02\n\n\x0c\n\x05\x04\0\x02\x0c\x05\x12\x03#\x0b\x0f\n\x0c\n\x05\ \x04\0\x02\x0c\x01\x12\x03#\x10\x17\n\x0c\n\x05\x04\0\x02\x0c\x03\x12\ \x03#\x1a\x1c\n\x0b\n\x04\x04\0\x02\r\x12\x03$\x02!\n\x0c\n\x05\x04\0\ \x02\r\x04\x12\x03$\x02\n\n\x0c\n\x05\x04\0\x02\r\x05\x12\x03$\x0b\x11\n\ \x0c\n\x05\x04\0\x02\r\x01\x12\x03$\x12\x1b\n\x0c\n\x05\x04\0\x02\r\x03\ \x12\x03$\x1e\x20\n\x0b\n\x04\x04\0\x02\x0e\x12\x03%\x02.\n\x0c\n\x05\ \x04\0\x02\x0e\x04\x12\x03%\x02\n\n\x0c\n\x05\x04\0\x02\x0e\x06\x12\x03%\ \x0b\x1e\n\x0c\n\x05\x04\0\x02\x0e\x01\x12\x03%\x1f(\n\x0c\n\x05\x04\0\ \x02\x0e\x03\x12\x03%+-\n\x0b\n\x04\x04\0\x02\x0f\x12\x03&\x02)\n\x0c\n\ \x05\x04\0\x02\x0f\x06\x12\x03&\x02\x15\n\x0c\n\x05\x04\0\x02\x0f\x01\ \x12\x03&\x16#\n\x0c\n\x05\x04\0\x02\x0f\x03\x12\x03&&(\n\x0b\n\x04\x04\ \0\x02\x10\x12\x03'\x02,\n\x0c\n\x05\x04\0\x02\x10\x04\x12\x03'\x02\n\n\ \x0c\n\x05\x04\0\x02\x10\x06\x12\x03'\x0b\x1a\n\x0c\n\x05\x04\0\x02\x10\ \x01\x12\x03'\x1b&\n\x0c\n\x05\x04\0\x02\x10\x03\x12\x03')+\n\x0b\n\x04\ \x04\0\x02\x11\x12\x03(\x02$\n\x0c\n\x05\x04\0\x02\x11\x04\x12\x03(\x02\ \n\n\x0c\n\x05\x04\0\x02\x11\x05\x12\x03(\x0b\x11\n\x0c\n\x05\x04\0\x02\ \x11\x01\x12\x03(\x12\x1e\n\x0c\n\x05\x04\0\x02\x11\x03\x12\x03(!#\n\x0b\ \n\x04\x04\0\x02\x12\x12\x03)\x026\n\x0c\n\x05\x04\0\x02\x12\x04\x12\x03\ )\x02\n\n\x0c\n\x05\x04\0\x02\x12\x06\x12\x03)\x0b\x1a\n\x0c\n\x05\x04\0\ \x02\x12\x01\x12\x03)\x1b0\n\x0c\n\x05\x04\0\x02\x12\x03\x12\x03)35\n9\n\ \x04\x04\0\x02\x13\x12\x03+\x02$\x1a,\x20Optional\x20url\x20for\x20more\ \x20info\x20about\x20the\x20font.\n\n\x0c\n\x05\x04\0\x02\x13\x04\x12\ \x03+\x02\n\n\x0c\n\x05\x04\0\x02\x13\x05\x12\x03+\x0b\x11\n\x0c\n\x05\ \x04\0\x02\x13\x01\x12\x03+\x12\x1e\n\x0c\n\x05\x04\0\x02\x13\x03\x12\ \x03+!#\nX\n\x04\x04\0\x02\x14\x12\x03-\x02&\x1aK\x20The\x20script\x20to\ \x20use\x20when\x20picking\x20sample\x20text.\x20See\x20the\x20Script\ \x20spanner\x20table.\n\n\x0c\n\x05\x04\0\x02\x14\x04\x12\x03-\x02\n\n\ \x0c\n\x05\x04\0\x02\x14\x05\x12\x03-\x0b\x11\n\x0c\n\x05\x04\0\x02\x14\ \x01\x12\x03-\x12\x20\n\x0c\n\x05\x04\0\x02\x14\x03\x12\x03-#%\n\x0b\n\ \x04\x04\0\x02\x15\x12\x03/\x02(\n\x0c\n\x05\x04\0\x02\x15\x04\x12\x03/\ \x02\n\n\x0c\n\x05\x04\0\x02\x15\x05\x12\x03/\x0b\x11\n\x0c\n\x05\x04\0\ \x02\x15\x01\x12\x03/\x12\"\n\x0c\n\x05\x04\0\x02\x15\x03\x12\x03/%'\n\ \xad\x01\n\x04\x04\0\x02\x16\x12\x034\x02\x1e\x1a\x9f\x01\x20Stroke\x20o\ f\x20the\x20letter\x20forms:\x20serif,\x20sans\x20serif,\x20etc.\x20Stro\ ke\x20is\x20mutually\n\x20exclusive.\x20The\x20values\x20are\x20the\x20s\ tring\x20names\x20from\x20the\x20Stroke\x20enum\x20or\x20the\n\x20empty\ \x20string.\n\n\x0c\n\x05\x04\0\x02\x16\x04\x12\x034\x02\n\n\x0c\n\x05\ \x04\0\x02\x16\x05\x12\x034\x0b\x11\n\x0c\n\x05\x04\0\x02\x16\x01\x12\ \x034\x12\x18\n\x0c\n\x05\x04\0\x02\x16\x03\x12\x034\x1b\x1d\n\xa3\x01\n\ \x04\x04\0\x02\x17\x12\x038\x02'\x1a\x88\x01\x20A\x20family's\x20broad\ \x20classifications:\x20display,\x20handwriting,\x20monospace,\x20etc.\n\ \x20The\x20values\x20are\x20the\x20string\x20names\x20from\x20the\x20Cla\ ssification\x20enum.\n\"\x0b\x20Next\x20=\x2025\n\n\x0c\n\x05\x04\0\x02\ \x17\x04\x12\x038\x02\n\n\x0c\n\x05\x04\0\x02\x17\x05\x12\x038\x0b\x11\n\ \x0c\n\x05\x04\0\x02\x17\x01\x12\x038\x12!\n\x0c\n\x05\x04\0\x02\x17\x03\ \x12\x038$&\n\n\n\x02\x04\x01\x12\x04<\0D\x01\n\n\n\x03\x04\x01\x01\x12\ \x03<\x08\x11\n\x0b\n\x04\x04\x01\x02\0\x12\x03=\x02\x1b\n\x0c\n\x05\x04\ \x01\x02\0\x04\x12\x03=\x02\n\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03=\x0b\ \x11\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03=\x12\x16\n\x0c\n\x05\x04\x01\ \x02\0\x03\x12\x03=\x19\x1a\n\x0b\n\x04\x04\x01\x02\x01\x12\x03>\x02\x1c\ \n\x0c\n\x05\x04\x01\x02\x01\x04\x12\x03>\x02\n\n\x0c\n\x05\x04\x01\x02\ \x01\x05\x12\x03>\x0b\x11\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03>\x12\ \x17\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03>\x1a\x1b\n\x0b\n\x04\x04\ \x01\x02\x02\x12\x03?\x02\x1c\n\x0c\n\x05\x04\x01\x02\x02\x04\x12\x03?\ \x02\n\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03?\x0b\x10\n\x0c\n\x05\x04\ \x01\x02\x02\x01\x12\x03?\x11\x17\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\ \x03?\x1a\x1b\n\x0b\n\x04\x04\x01\x02\x03\x12\x03@\x02\x1f\n\x0c\n\x05\ \x04\x01\x02\x03\x04\x12\x03@\x02\n\n\x0c\n\x05\x04\x01\x02\x03\x05\x12\ \x03@\x0b\x11\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03@\x12\x1a\n\x0c\n\ \x05\x04\x01\x02\x03\x03\x12\x03@\x1d\x1e\n\x0b\n\x04\x04\x01\x02\x04\ \x12\x03A\x02'\n\x0c\n\x05\x04\x01\x02\x04\x04\x12\x03A\x02\n\n\x0c\n\ \x05\x04\x01\x02\x04\x05\x12\x03A\x0b\x11\n\x0c\n\x05\x04\x01\x02\x04\ \x01\x12\x03A\x12\"\n\x0c\n\x05\x04\x01\x02\x04\x03\x12\x03A%&\n\x0b\n\ \x04\x04\x01\x02\x05\x12\x03B\x02\x20\n\x0c\n\x05\x04\x01\x02\x05\x04\ \x12\x03B\x02\n\n\x0c\n\x05\x04\x01\x02\x05\x05\x12\x03B\x0b\x11\n\x0c\n\ \x05\x04\x01\x02\x05\x01\x12\x03B\x12\x1b\n\x0c\n\x05\x04\x01\x02\x05\ \x03\x12\x03B\x1e\x1f\n\x0b\n\x04\x04\x01\x02\x06\x12\x03C\x02\x20\n\x0c\ \n\x05\x04\x01\x02\x06\x04\x12\x03C\x02\n\n\x0c\n\x05\x04\x01\x02\x06\ \x05\x12\x03C\x0b\x11\n\x0c\n\x05\x04\x01\x02\x06\x01\x12\x03C\x12\x1b\n\ \x0c\n\x05\x04\x01\x02\x06\x03\x12\x03C\x1e\x1f\n\n\n\x02\x04\x02\x12\ \x04F\0M\x01\n\n\n\x03\x04\x02\x01\x12\x03F\x08\x18\n\x0b\n\x04\x04\x02\ \x02\0\x12\x03G\x02\x1a\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03G\x02\n\n\ \x0c\n\x05\x04\x02\x02\0\x05\x12\x03G\x0b\x11\n\x0c\n\x05\x04\x02\x02\0\ \x01\x12\x03G\x12\x15\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03G\x18\x19\n\ \x0b\n\x04\x04\x02\x02\x01\x12\x03H\x02\x1f\n\x0c\n\x05\x04\x02\x02\x01\ \x04\x12\x03H\x02\n\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03H\x0b\x10\n\ \x0c\n\x05\x04\x02\x02\x01\x01\x12\x03H\x11\x1a\n\x0c\n\x05\x04\x02\x02\ \x01\x03\x12\x03H\x1d\x1e\n\n\n\x03\x04\x02\t\x12\x03I\x02\r\n\x0b\n\x04\ \x04\x02\t\0\x12\x03I\x0b\x0c\n\x0c\n\x05\x04\x02\t\0\x01\x12\x03I\x0b\ \x0c\n\x0c\n\x05\x04\x02\t\0\x02\x12\x03I\x0b\x0c\n\n\n\x03\x04\x02\n\ \x12\x03J\x02\x1b\n\x0b\n\x04\x04\x02\n\0\x12\x03J\x0b\x1a\n\x17\n\x04\ \x04\x02\x02\x02\x12\x03K\x02\x1f\"\n\x20Next\x20=\x205\n\n\x0c\n\x05\ \x04\x02\x02\x02\x04\x12\x03K\x02\n\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\ \x03K\x0b\x10\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03K\x11\x1a\n\x0c\n\ \x05\x04\x02\x02\x02\x03\x12\x03K\x1d\x1e\n\n\n\x02\x04\x03\x12\x04O\0Y\ \x01\n\n\n\x03\x04\x03\x01\x12\x03O\x08\x13\n\x0b\n\x04\x04\x03\x02\0\ \x12\x03P\x02%\n\x0c\n\x05\x04\x03\x02\0\x04\x12\x03P\x02\n\n\x0c\n\x05\ \x04\x03\x02\0\x05\x12\x03P\x0b\x11\n\x0c\n\x05\x04\x03\x02\0\x01\x12\ \x03P\x12\x20\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03P#$\n\x0b\n\x04\x04\ \x03\x02\x01\x12\x03Q\x02\x1d\n\x0c\n\x05\x04\x03\x02\x01\x04\x12\x03Q\ \x02\n\n\x0c\n\x05\x04\x03\x02\x01\x05\x12\x03Q\x0b\x11\n\x0c\n\x05\x04\ \x03\x02\x01\x01\x12\x03Q\x12\x18\n\x0c\n\x05\x04\x03\x02\x01\x03\x12\ \x03Q\x1b\x1c\n\x0b\n\x04\x04\x03\x02\x02\x12\x03R\x02\x1d\n\x0c\n\x05\ \x04\x03\x02\x02\x04\x12\x03R\x02\n\n\x0c\n\x05\x04\x03\x02\x02\x05\x12\ \x03R\x0b\x11\n\x0c\n\x05\x04\x03\x02\x02\x01\x12\x03R\x12\x18\n\x0c\n\ \x05\x04\x03\x02\x02\x03\x12\x03R\x1b\x1c\n\x0b\n\x04\x04\x03\x02\x03\ \x12\x03S\x02\"\n\x0c\n\x05\x04\x03\x02\x03\x04\x12\x03S\x02\n\n\x0c\n\ \x05\x04\x03\x02\x03\x05\x12\x03S\x0b\x11\n\x0c\n\x05\x04\x03\x02\x03\ \x01\x12\x03S\x12\x1d\n\x0c\n\x05\x04\x03\x02\x03\x03\x12\x03S\x20!\nD\n\ \x04\x04\x03\x02\x04\x12\x04T\x02U\x08\"6\x20See\x20https://github.com/g\ ooglefonts/fontc/issues/1124\n\n\x0c\n\x05\x04\x03\x02\x04\x04\x12\x03T\ \x02\n\n\x0c\n\x05\x04\x03\x02\x04\x05\x12\x03T\x0b\x11\n\x0c\n\x05\x04\ \x03\x02\x04\x01\x12\x03T\x12\x1d\n\x0c\n\x05\x04\x03\x02\x04\x03\x12\ \x03U\x06\x07\n\x0b\n\x04\x04\x03\x02\x05\x12\x03V\x02%\n\x0c\n\x05\x04\ \x03\x02\x05\x04\x12\x03V\x02\n\n\x0c\n\x05\x04\x03\x02\x05\x06\x12\x03V\ \x0b\x1a\n\x0c\n\x05\x04\x03\x02\x05\x01\x12\x03V\x1b\x20\n\x0c\n\x05\ \x04\x03\x02\x05\x03\x12\x03V#$\n\x81\x01\n\x02\x04\x04\x12\x04]\0`\x01\ \x1au\x20A\x20file\x20to\x20take\x20from\x20source\x20and\x20where\x20to\ \x20put\x20it\x20in\x20dest\n\x20Ex\x20web/split/Roboto[wdth,wght].ttf\ \x20=>\x20Roboto[wdth,wght].ttf\n\n\n\n\x03\x04\x04\x01\x12\x03]\x08\x17\ \n\x0b\n\x04\x04\x04\x02\0\x12\x03^\x02\"\n\x0c\n\x05\x04\x04\x02\0\x04\ \x12\x03^\x02\n\n\x0c\n\x05\x04\x04\x02\0\x05\x12\x03^\x0b\x11\n\x0c\n\ \x05\x04\x04\x02\0\x01\x12\x03^\x12\x1d\n\x0c\n\x05\x04\x04\x02\0\x03\ \x12\x03^\x20!\n\x0b\n\x04\x04\x04\x02\x01\x12\x03_\x02\x20\n\x0c\n\x05\ \x04\x04\x02\x01\x04\x12\x03_\x02\n\n\x0c\n\x05\x04\x04\x02\x01\x05\x12\ \x03_\x0b\x11\n\x0c\n\x05\x04\x04\x02\x01\x01\x12\x03_\x12\x1b\n\x0c\n\ \x05\x04\x04\x02\x01\x03\x12\x03_\x1e\x1f\n\n\n\x02\x05\0\x12\x04b\0i\ \x01\n\n\n\x03\x05\0\x01\x12\x03b\x05\x14\n\x0b\n\x04\x05\0\x02\0\x12\ \x03c\x02\x19\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03c\x02\x14\n\x0c\n\x05\ \x05\0\x02\0\x02\x12\x03c\x17\x18\n\x0b\n\x04\x05\0\x02\x01\x12\x03d\x02\ \x18\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03d\x02\x13\n\x0c\n\x05\x05\0\ \x02\x01\x02\x12\x03d\x16\x17\n\x0b\n\x04\x05\0\x02\x02\x12\x03e\x02\x14\ \n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03e\x02\x0f\n\x0c\n\x05\x05\0\x02\ \x02\x02\x12\x03e\x12\x13\n\x0b\n\x04\x05\0\x02\x03\x12\x03f\x02\x16\n\ \x0c\n\x05\x05\0\x02\x03\x01\x12\x03f\x02\x11\n\x0c\n\x05\x05\0\x02\x03\ \x02\x12\x03f\x14\x15\n\x0b\n\x04\x05\0\x02\x04\x12\x03g\x02\x18\n\x0c\n\ \x05\x05\0\x02\x04\x01\x12\x03g\x02\x13\n\x0c\n\x05\x05\0\x02\x04\x02\ \x12\x03g\x16\x17\n\x0b\n\x04\x05\0\x02\x05\x12\x03h\x02\x14\n\x0c\n\x05\ \x05\0\x02\x05\x01\x12\x03h\x02\x0f\n\x0c\n\x05\x05\0\x02\x05\x02\x12\ \x03h\x12\x13\nJ\n\x02\x04\x05\x12\x04l\0n\x01\x1a>\x20Message\x20so\x20\ we\x20can\x20add\x20additional\x20fields\x20like\x20value\x20in\x20futur\ e\n\n\n\n\x03\x04\x05\x01\x12\x03l\x08\x13\n\x18\n\x04\x04\x05\x02\0\x12\ \x03m\x02+\"\x0b\x20\x20e.g.,\x20OS\n\n\x0c\n\x05\x04\x05\x02\0\x04\x12\ \x03m\x02\n\n\x0c\n\x05\x04\x05\x02\0\x06\x12\x03m\x0b\x1a\n\x0c\n\x05\ \x04\x05\x02\0\x01\x12\x03m\x1b&\n\x0c\n\x05\x04\x05\x02\0\x03\x12\x03m)\ *\n\n\n\x02\x04\x06\x12\x04p\0w\x01\n\n\n\x03\x04\x06\x01\x12\x03p\x08\ \x1b\n'\n\x04\x04\x06\x02\0\x12\x03q\x02,\"\x1a\x20activate\x20for\x20th\ is\x20region\n\n\x0c\n\x05\x04\x06\x02\0\x04\x12\x03q\x02\n\n\x0c\n\x05\ \x04\x06\x02\0\x06\x12\x03q\x0b\x1b\n\x0c\n\x05\x04\x06\x02\0\x01\x12\ \x03q\x1c'\n\x0c\n\x05\x04\x06\x02\0\x03\x12\x03q*+\n(\n\x04\x04\x06\x02\ \x01\x12\x03r\x02\"\"\x1b\x20activate\x20for\x20any\x20of\x20these\n\n\ \x0c\n\x05\x04\x06\x02\x01\x04\x12\x03r\x02\n\n\x0c\n\x05\x04\x06\x02\ \x01\x06\x12\x03r\x0b\x16\n\x0c\n\x05\x04\x06\x02\x01\x01\x12\x03r\x17\ \x1d\n\x0c\n\x05\x04\x06\x02\x01\x03\x12\x03r\x20!\n\x17\n\x04\x04\x06\ \x02\x02\x12\x03s\x02%\"\n\x20e.g.\x2090%\n\n\x0c\n\x05\x04\x06\x02\x02\ \x04\x12\x03s\x02\n\n\x0c\n\x05\x04\x06\x02\x02\x05\x12\x03s\x0b\x10\n\ \x0c\n\x05\x04\x06\x02\x02\x01\x12\x03s\x11\x20\n\x0c\n\x05\x04\x06\x02\ \x02\x03\x12\x03s#$\n\x18\n\x04\x04\x06\x02\x03\x12\x03t\x02)\"\x0b\x20e\ .g.\x20110%\n\n\x0c\n\x05\x04\x06\x02\x03\x04\x12\x03t\x02\n\n\x0c\n\x05\ \x04\x06\x02\x03\x05\x12\x03t\x0b\x10\n\x0c\n\x05\x04\x06\x02\x03\x01\ \x12\x03t\x11$\n\x0c\n\x05\x04\x06\x02\x03\x03\x12\x03t'(\n3\n\x04\x04\ \x06\x02\x04\x12\x03u\x02\x20\"&\x20e.g.\x20Impact;\x20the\x20local\x20f\ amily\x20to\x20use\n\n\x0c\n\x05\x04\x06\x02\x04\x04\x12\x03u\x02\n\n\ \x0c\n\x05\x04\x06\x02\x04\x05\x12\x03u\x0b\x11\n\x0c\n\x05\x04\x06\x02\ \x04\x01\x12\x03u\x12\x1b\n\x0c\n\x05\x04\x06\x02\x04\x03\x12\x03u\x1e\ \x1f\nx\n\x02\x04\x07\x12\x05{\0\x89\x01\x01\x1ak\x20Corresponds\x20to\ \x20SampleTextProto\x20in\n\x20google3/java/com/google/fonts/backend/spa\ nner/google_fonts_proto.proto\n\n\n\n\x03\x04\x07\x01\x12\x03{\x08\x17\n\ \x0b\n\x04\x04\x07\x02\0\x12\x03|\x02$\n\x0c\n\x05\x04\x07\x02\0\x04\x12\ \x03|\x02\n\n\x0c\n\x05\x04\x07\x02\0\x05\x12\x03|\x0b\x11\n\x0c\n\x05\ \x04\x07\x02\0\x01\x12\x03|\x12\x1f\n\x0c\n\x05\x04\x07\x02\0\x03\x12\ \x03|\"#\n\x0b\n\x04\x04\x07\x02\x01\x12\x03}\x02'\n\x0c\n\x05\x04\x07\ \x02\x01\x04\x12\x03}\x02\n\n\x0c\n\x05\x04\x07\x02\x01\x05\x12\x03}\x0b\ \x11\n\x0c\n\x05\x04\x07\x02\x01\x01\x12\x03}\x12\"\n\x0c\n\x05\x04\x07\ \x02\x01\x03\x12\x03}%&\n\x0b\n\x04\x04\x07\x02\x02\x12\x03~\x02\x1d\n\ \x0c\n\x05\x04\x07\x02\x02\x04\x12\x03~\x02\n\n\x0c\n\x05\x04\x07\x02\ \x02\x05\x12\x03~\x0b\x11\n\x0c\n\x05\x04\x07\x02\x02\x01\x12\x03~\x12\ \x18\n\x0c\n\x05\x04\x07\x02\x02\x03\x12\x03~\x1b\x1c\n\x0b\n\x04\x04\ \x07\x02\x03\x12\x03\x7f\x02\x1d\n\x0c\n\x05\x04\x07\x02\x03\x04\x12\x03\ \x7f\x02\n\n\x0c\n\x05\x04\x07\x02\x03\x05\x12\x03\x7f\x0b\x11\n\x0c\n\ \x05\x04\x07\x02\x03\x01\x12\x03\x7f\x12\x18\n\x0c\n\x05\x04\x07\x02\x03\ \x03\x12\x03\x7f\x1b\x1c\n\x0c\n\x04\x04\x07\x02\x04\x12\x04\x80\x01\x02\ \x20\n\r\n\x05\x04\x07\x02\x04\x04\x12\x04\x80\x01\x02\n\n\r\n\x05\x04\ \x07\x02\x04\x05\x12\x04\x80\x01\x0b\x11\n\r\n\x05\x04\x07\x02\x04\x01\ \x12\x04\x80\x01\x12\x1b\n\r\n\x05\x04\x07\x02\x04\x03\x12\x04\x80\x01\ \x1e\x1f\n\x0c\n\x04\x04\x07\x02\x05\x12\x04\x81\x01\x02\x20\n\r\n\x05\ \x04\x07\x02\x05\x04\x12\x04\x81\x01\x02\n\n\r\n\x05\x04\x07\x02\x05\x05\ \x12\x04\x81\x01\x0b\x11\n\r\n\x05\x04\x07\x02\x05\x01\x12\x04\x81\x01\ \x12\x1b\n\r\n\x05\x04\x07\x02\x05\x03\x12\x04\x81\x01\x1e\x1f\n\x0c\n\ \x04\x04\x07\x02\x06\x12\x04\x82\x01\x02\x20\n\r\n\x05\x04\x07\x02\x06\ \x04\x12\x04\x82\x01\x02\n\n\r\n\x05\x04\x07\x02\x06\x05\x12\x04\x82\x01\ \x0b\x11\n\r\n\x05\x04\x07\x02\x06\x01\x12\x04\x82\x01\x12\x1b\n\r\n\x05\ \x04\x07\x02\x06\x03\x12\x04\x82\x01\x1e\x1f\n\x0c\n\x04\x04\x07\x02\x07\ \x12\x04\x83\x01\x02\"\n\r\n\x05\x04\x07\x02\x07\x04\x12\x04\x83\x01\x02\ \n\n\r\n\x05\x04\x07\x02\x07\x05\x12\x04\x83\x01\x0b\x11\n\r\n\x05\x04\ \x07\x02\x07\x01\x12\x04\x83\x01\x12\x1d\n\r\n\x05\x04\x07\x02\x07\x03\ \x12\x04\x83\x01\x20!\n\x0c\n\x04\x04\x07\x02\x08\x12\x04\x84\x01\x02\"\ \n\r\n\x05\x04\x07\x02\x08\x04\x12\x04\x84\x01\x02\n\n\r\n\x05\x04\x07\ \x02\x08\x05\x12\x04\x84\x01\x0b\x11\n\r\n\x05\x04\x07\x02\x08\x01\x12\ \x04\x84\x01\x12\x1d\n\r\n\x05\x04\x07\x02\x08\x03\x12\x04\x84\x01\x20!\ \n\x0c\n\x04\x04\x07\x02\t\x12\x04\x85\x01\x02#\n\r\n\x05\x04\x07\x02\t\ \x04\x12\x04\x85\x01\x02\n\n\r\n\x05\x04\x07\x02\t\x05\x12\x04\x85\x01\ \x0b\x11\n\r\n\x05\x04\x07\x02\t\x01\x12\x04\x85\x01\x12\x1d\n\r\n\x05\ \x04\x07\x02\t\x03\x12\x04\x85\x01\x20\"\n\x0c\n\x04\x04\x07\x02\n\x12\ \x04\x86\x01\x02#\n\r\n\x05\x04\x07\x02\n\x04\x12\x04\x86\x01\x02\n\n\r\ \n\x05\x04\x07\x02\n\x05\x12\x04\x86\x01\x0b\x11\n\r\n\x05\x04\x07\x02\n\ \x01\x12\x04\x86\x01\x12\x1d\n\r\n\x05\x04\x07\x02\n\x03\x12\x04\x86\x01\ \x20\"\n\x0c\n\x04\x04\x07\x02\x0b\x12\x04\x87\x01\x02#\n\r\n\x05\x04\ \x07\x02\x0b\x04\x12\x04\x87\x01\x02\n\n\r\n\x05\x04\x07\x02\x0b\x05\x12\ \x04\x87\x01\x0b\x11\n\r\n\x05\x04\x07\x02\x0b\x01\x12\x04\x87\x01\x12\ \x1d\n\r\n\x05\x04\x07\x02\x0b\x03\x12\x04\x87\x01\x20\"\n\x0c\n\x04\x04\ \x07\x02\x0c\x12\x04\x88\x01\x02\x1c\n\r\n\x05\x04\x07\x02\x0c\x04\x12\ \x04\x88\x01\x02\n\n\r\n\x05\x04\x07\x02\x0c\x05\x12\x04\x88\x01\x0b\x11\ \n\r\n\x05\x04\x07\x02\x0c\x01\x12\x04\x88\x01\x12\x16\n\r\n\x05\x04\x07\ \x02\x0c\x03\x12\x04\x88\x01\x19\x1b\n\x0c\n\x02\x04\x08\x12\x06\x8b\x01\ \0\x8e\x01\x01\n\x0b\n\x03\x04\x08\x01\x12\x04\x8b\x01\x08\x17\n\x0c\n\ \x04\x04\x08\x02\0\x12\x04\x8c\x01\x02\x1b\n\r\n\x05\x04\x08\x02\0\x04\ \x12\x04\x8c\x01\x02\n\n\r\n\x05\x04\x08\x02\0\x05\x12\x04\x8c\x01\x0b\ \x11\n\r\n\x05\x04\x08\x02\0\x01\x12\x04\x8c\x01\x12\x16\n\r\n\x05\x04\ \x08\x02\0\x03\x12\x04\x8c\x01\x19\x1a\n\x0c\n\x04\x04\x08\x02\x01\x12\ \x04\x8d\x01\x02\x1d\n\r\n\x05\x04\x08\x02\x01\x04\x12\x04\x8d\x01\x02\n\ \n\r\n\x05\x04\x08\x02\x01\x05\x12\x04\x8d\x01\x0b\x11\n\r\n\x05\x04\x08\ \x02\x01\x01\x12\x04\x8d\x01\x12\x18\n\r\n\x05\x04\x08\x02\x01\x03\x12\ \x04\x8d\x01\x1b\x1c\ "; /// `FileDescriptorProto` object which was a source for this generated file fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); file_descriptor_proto_lazy.get(|| { ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() }) } /// `FileDescriptor` object which allows dynamic access to files pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); file_descriptor.get(|| { let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { let mut deps = ::std::vec::Vec::with_capacity(0); let mut messages = ::std::vec::Vec::with_capacity(9); messages.push(FamilyProto::generated_message_descriptor_data()); messages.push(FontProto::generated_message_descriptor_data()); messages.push(AxisSegmentProto::generated_message_descriptor_data()); messages.push(SourceProto::generated_message_descriptor_data()); messages.push(SourceFileProto::generated_message_descriptor_data()); messages.push(TargetProto::generated_message_descriptor_data()); messages.push(FamilyFallbackProto::generated_message_descriptor_data()); messages.push(SampleTextProto::generated_message_descriptor_data()); messages.push(GlyphGroupProto::generated_message_descriptor_data()); let mut enums = ::std::vec::Vec::with_capacity(1); enums.push(TargetTypeProto::generated_enum_descriptor_data()); ::protobuf::reflect::GeneratedFileDescriptor::new_generated( file_descriptor_proto(), deps, messages, enums, ) }); ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } googlefonts-gf-metadata-5fa0932/src/knowledge.rs000066400000000000000000002036521521447034200216710ustar00rootroot00000000000000// This file is generated by rust-protobuf 3.7.2. Do not edit // .proto file is parsed by protoc --rs_out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![cfg_attr(rustfmt, rustfmt::skip)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(trivial_casts)] #![allow(unused_results)] #![allow(unused_mut)] //! Generated file from `knowledge.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; /// * Knowledge metadata. // @@protoc_insertion_point(message:fonts.KnowledgeProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct KnowledgeProto { // message fields /// * Module ids in order. // @@protoc_insertion_point(field:fonts.KnowledgeProto.modules) pub modules: ::std::vec::Vec<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:fonts.KnowledgeProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a KnowledgeProto { fn default() -> &'a KnowledgeProto { ::default_instance() } } impl KnowledgeProto { pub fn new() -> KnowledgeProto { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "modules", |m: &KnowledgeProto| { &m.modules }, |m: &mut KnowledgeProto| { &mut m.modules }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "KnowledgeProto", fields, oneofs, ) } } impl ::protobuf::Message for KnowledgeProto { const NAME: &'static str = "KnowledgeProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.modules.push(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.modules { my_size += ::protobuf::rt::string_size(1, &value); }; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.modules { os.write_string(1, &v)?; }; os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> KnowledgeProto { KnowledgeProto::new() } fn clear(&mut self) { self.modules.clear(); self.special_fields.clear(); } fn default_instance() -> &'static KnowledgeProto { static instance: KnowledgeProto = KnowledgeProto { modules: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for KnowledgeProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("KnowledgeProto").unwrap()).clone() } } impl ::std::fmt::Display for KnowledgeProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for KnowledgeProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// * /// Knowledge module metadata. /// ///

Module id is inferred from directory name in the filesystem. // @@protoc_insertion_point(message:fonts.ModuleProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct ModuleProto { // message fields // @@protoc_insertion_point(field:fonts.ModuleProto.alt_ids) pub alt_ids: ::std::vec::Vec<::std::string::String>, // @@protoc_insertion_point(field:fonts.ModuleProto.name) pub name: ::std::option::Option<::std::string::String>, /// * Brief description of the module. // @@protoc_insertion_point(field:fonts.ModuleProto.excerpt) pub excerpt: ::std::option::Option<::std::string::String>, /// * Ids of constituent lessons in order. // @@protoc_insertion_point(field:fonts.ModuleProto.lessons) pub lessons: ::std::vec::Vec<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:fonts.ModuleProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a ModuleProto { fn default() -> &'a ModuleProto { ::default_instance() } } impl ModuleProto { pub fn new() -> ModuleProto { ::std::default::Default::default() } // optional string name = 2; pub fn name(&self) -> &str { match self.name.as_ref() { Some(v) => v, None => "", } } pub fn clear_name(&mut self) { self.name = ::std::option::Option::None; } pub fn has_name(&self) -> bool { self.name.is_some() } // Param is passed by value, moved pub fn set_name(&mut self, v: ::std::string::String) { self.name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_name(&mut self) -> &mut ::std::string::String { if self.name.is_none() { self.name = ::std::option::Option::Some(::std::string::String::new()); } self.name.as_mut().unwrap() } // Take field pub fn take_name(&mut self) -> ::std::string::String { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string excerpt = 3; pub fn excerpt(&self) -> &str { match self.excerpt.as_ref() { Some(v) => v, None => "", } } pub fn clear_excerpt(&mut self) { self.excerpt = ::std::option::Option::None; } pub fn has_excerpt(&self) -> bool { self.excerpt.is_some() } // Param is passed by value, moved pub fn set_excerpt(&mut self, v: ::std::string::String) { self.excerpt = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_excerpt(&mut self) -> &mut ::std::string::String { if self.excerpt.is_none() { self.excerpt = ::std::option::Option::Some(::std::string::String::new()); } self.excerpt.as_mut().unwrap() } // Take field pub fn take_excerpt(&mut self) -> ::std::string::String { self.excerpt.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(4); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "alt_ids", |m: &ModuleProto| { &m.alt_ids }, |m: &mut ModuleProto| { &mut m.alt_ids }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "name", |m: &ModuleProto| { &m.name }, |m: &mut ModuleProto| { &mut m.name }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "excerpt", |m: &ModuleProto| { &m.excerpt }, |m: &mut ModuleProto| { &mut m.excerpt }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "lessons", |m: &ModuleProto| { &m.lessons }, |m: &mut ModuleProto| { &mut m.lessons }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "ModuleProto", fields, oneofs, ) } } impl ::protobuf::Message for ModuleProto { const NAME: &'static str = "ModuleProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.alt_ids.push(is.read_string()?); }, 18 => { self.name = ::std::option::Option::Some(is.read_string()?); }, 26 => { self.excerpt = ::std::option::Option::Some(is.read_string()?); }, 34 => { self.lessons.push(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.alt_ids { my_size += ::protobuf::rt::string_size(1, &value); }; if let Some(v) = self.name.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } if let Some(v) = self.excerpt.as_ref() { my_size += ::protobuf::rt::string_size(3, &v); } for value in &self.lessons { my_size += ::protobuf::rt::string_size(4, &value); }; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.alt_ids { os.write_string(1, &v)?; }; if let Some(v) = self.name.as_ref() { os.write_string(2, v)?; } if let Some(v) = self.excerpt.as_ref() { os.write_string(3, v)?; } for v in &self.lessons { os.write_string(4, &v)?; }; os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> ModuleProto { ModuleProto::new() } fn clear(&mut self) { self.alt_ids.clear(); self.name = ::std::option::Option::None; self.excerpt = ::std::option::Option::None; self.lessons.clear(); self.special_fields.clear(); } fn default_instance() -> &'static ModuleProto { static instance: ModuleProto = ModuleProto { alt_ids: ::std::vec::Vec::new(), name: ::std::option::Option::None, excerpt: ::std::option::Option::None, lessons: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for ModuleProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("ModuleProto").unwrap()).clone() } } impl ::std::fmt::Display for ModuleProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ModuleProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// * /// Knowledge topic metadata. /// ///

Topic id is inferred from directory name in the filesystem. // @@protoc_insertion_point(message:fonts.TopicProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct TopicProto { // message fields // @@protoc_insertion_point(field:fonts.TopicProto.alt_ids) pub alt_ids: ::std::vec::Vec<::std::string::String>, // @@protoc_insertion_point(field:fonts.TopicProto.name) pub name: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:fonts.TopicProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a TopicProto { fn default() -> &'a TopicProto { ::default_instance() } } impl TopicProto { pub fn new() -> TopicProto { ::std::default::Default::default() } // optional string name = 2; pub fn name(&self) -> &str { match self.name.as_ref() { Some(v) => v, None => "", } } pub fn clear_name(&mut self) { self.name = ::std::option::Option::None; } pub fn has_name(&self) -> bool { self.name.is_some() } // Param is passed by value, moved pub fn set_name(&mut self, v: ::std::string::String) { self.name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_name(&mut self) -> &mut ::std::string::String { if self.name.is_none() { self.name = ::std::option::Option::Some(::std::string::String::new()); } self.name.as_mut().unwrap() } // Take field pub fn take_name(&mut self) -> ::std::string::String { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(2); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "alt_ids", |m: &TopicProto| { &m.alt_ids }, |m: &mut TopicProto| { &mut m.alt_ids }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "name", |m: &TopicProto| { &m.name }, |m: &mut TopicProto| { &mut m.name }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "TopicProto", fields, oneofs, ) } } impl ::protobuf::Message for TopicProto { const NAME: &'static str = "TopicProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.alt_ids.push(is.read_string()?); }, 18 => { self.name = ::std::option::Option::Some(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.alt_ids { my_size += ::protobuf::rt::string_size(1, &value); }; if let Some(v) = self.name.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.alt_ids { os.write_string(1, &v)?; }; if let Some(v) = self.name.as_ref() { os.write_string(2, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> TopicProto { TopicProto::new() } fn clear(&mut self) { self.alt_ids.clear(); self.name = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static TopicProto { static instance: TopicProto = TopicProto { alt_ids: ::std::vec::Vec::new(), name: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for TopicProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("TopicProto").unwrap()).clone() } } impl ::std::fmt::Display for TopicProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for TopicProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// * /// Knowledge lesson metadata. /// ///

Lesson id, as well as id of the parent module, are inferred from path in /// the filesystem. // @@protoc_insertion_point(message:fonts.LessonProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct LessonProto { // message fields // @@protoc_insertion_point(field:fonts.LessonProto.alt_ids) pub alt_ids: ::std::vec::Vec<::std::string::String>, // @@protoc_insertion_point(field:fonts.LessonProto.name) pub name: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:fonts.LessonProto.authors) pub authors: ::std::vec::Vec<::std::string::String>, // @@protoc_insertion_point(field:fonts.LessonProto.reviewers) pub reviewers: ::std::vec::Vec<::std::string::String>, /// * Ids of tagged topics. // @@protoc_insertion_point(field:fonts.LessonProto.topics) pub topics: ::std::vec::Vec<::std::string::String>, /// * Ids of lessons to read before this one. // @@protoc_insertion_point(field:fonts.LessonProto.prev_lessons) pub prev_lessons: ::std::vec::Vec<::std::string::String>, /// * Ids of lessons to read after this one. // @@protoc_insertion_point(field:fonts.LessonProto.next_lessons) pub next_lessons: ::std::vec::Vec<::std::string::String>, /// * Ids of related glossary terms. // @@protoc_insertion_point(field:fonts.LessonProto.related_terms) pub related_terms: ::std::vec::Vec<::std::string::String>, /// * Brief description of the lesson. // @@protoc_insertion_point(field:fonts.LessonProto.excerpt) pub excerpt: ::std::option::Option<::std::string::String>, /// * URLs of related content, for example for use in an iframe. // @@protoc_insertion_point(field:fonts.LessonProto.related_content_urls) pub related_content_urls: ::std::vec::Vec<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:fonts.LessonProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a LessonProto { fn default() -> &'a LessonProto { ::default_instance() } } impl LessonProto { pub fn new() -> LessonProto { ::std::default::Default::default() } // optional string name = 2; pub fn name(&self) -> &str { match self.name.as_ref() { Some(v) => v, None => "", } } pub fn clear_name(&mut self) { self.name = ::std::option::Option::None; } pub fn has_name(&self) -> bool { self.name.is_some() } // Param is passed by value, moved pub fn set_name(&mut self, v: ::std::string::String) { self.name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_name(&mut self) -> &mut ::std::string::String { if self.name.is_none() { self.name = ::std::option::Option::Some(::std::string::String::new()); } self.name.as_mut().unwrap() } // Take field pub fn take_name(&mut self) -> ::std::string::String { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string excerpt = 9; pub fn excerpt(&self) -> &str { match self.excerpt.as_ref() { Some(v) => v, None => "", } } pub fn clear_excerpt(&mut self) { self.excerpt = ::std::option::Option::None; } pub fn has_excerpt(&self) -> bool { self.excerpt.is_some() } // Param is passed by value, moved pub fn set_excerpt(&mut self, v: ::std::string::String) { self.excerpt = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_excerpt(&mut self) -> &mut ::std::string::String { if self.excerpt.is_none() { self.excerpt = ::std::option::Option::Some(::std::string::String::new()); } self.excerpt.as_mut().unwrap() } // Take field pub fn take_excerpt(&mut self) -> ::std::string::String { self.excerpt.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(10); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "alt_ids", |m: &LessonProto| { &m.alt_ids }, |m: &mut LessonProto| { &mut m.alt_ids }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "name", |m: &LessonProto| { &m.name }, |m: &mut LessonProto| { &mut m.name }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "authors", |m: &LessonProto| { &m.authors }, |m: &mut LessonProto| { &mut m.authors }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "reviewers", |m: &LessonProto| { &m.reviewers }, |m: &mut LessonProto| { &mut m.reviewers }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "topics", |m: &LessonProto| { &m.topics }, |m: &mut LessonProto| { &mut m.topics }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "prev_lessons", |m: &LessonProto| { &m.prev_lessons }, |m: &mut LessonProto| { &mut m.prev_lessons }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "next_lessons", |m: &LessonProto| { &m.next_lessons }, |m: &mut LessonProto| { &mut m.next_lessons }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "related_terms", |m: &LessonProto| { &m.related_terms }, |m: &mut LessonProto| { &mut m.related_terms }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "excerpt", |m: &LessonProto| { &m.excerpt }, |m: &mut LessonProto| { &mut m.excerpt }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "related_content_urls", |m: &LessonProto| { &m.related_content_urls }, |m: &mut LessonProto| { &mut m.related_content_urls }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "LessonProto", fields, oneofs, ) } } impl ::protobuf::Message for LessonProto { const NAME: &'static str = "LessonProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.alt_ids.push(is.read_string()?); }, 18 => { self.name = ::std::option::Option::Some(is.read_string()?); }, 26 => { self.authors.push(is.read_string()?); }, 34 => { self.reviewers.push(is.read_string()?); }, 42 => { self.topics.push(is.read_string()?); }, 50 => { self.prev_lessons.push(is.read_string()?); }, 58 => { self.next_lessons.push(is.read_string()?); }, 66 => { self.related_terms.push(is.read_string()?); }, 74 => { self.excerpt = ::std::option::Option::Some(is.read_string()?); }, 82 => { self.related_content_urls.push(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.alt_ids { my_size += ::protobuf::rt::string_size(1, &value); }; if let Some(v) = self.name.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } for value in &self.authors { my_size += ::protobuf::rt::string_size(3, &value); }; for value in &self.reviewers { my_size += ::protobuf::rt::string_size(4, &value); }; for value in &self.topics { my_size += ::protobuf::rt::string_size(5, &value); }; for value in &self.prev_lessons { my_size += ::protobuf::rt::string_size(6, &value); }; for value in &self.next_lessons { my_size += ::protobuf::rt::string_size(7, &value); }; for value in &self.related_terms { my_size += ::protobuf::rt::string_size(8, &value); }; if let Some(v) = self.excerpt.as_ref() { my_size += ::protobuf::rt::string_size(9, &v); } for value in &self.related_content_urls { my_size += ::protobuf::rt::string_size(10, &value); }; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.alt_ids { os.write_string(1, &v)?; }; if let Some(v) = self.name.as_ref() { os.write_string(2, v)?; } for v in &self.authors { os.write_string(3, &v)?; }; for v in &self.reviewers { os.write_string(4, &v)?; }; for v in &self.topics { os.write_string(5, &v)?; }; for v in &self.prev_lessons { os.write_string(6, &v)?; }; for v in &self.next_lessons { os.write_string(7, &v)?; }; for v in &self.related_terms { os.write_string(8, &v)?; }; if let Some(v) = self.excerpt.as_ref() { os.write_string(9, v)?; } for v in &self.related_content_urls { os.write_string(10, &v)?; }; os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> LessonProto { LessonProto::new() } fn clear(&mut self) { self.alt_ids.clear(); self.name = ::std::option::Option::None; self.authors.clear(); self.reviewers.clear(); self.topics.clear(); self.prev_lessons.clear(); self.next_lessons.clear(); self.related_terms.clear(); self.excerpt = ::std::option::Option::None; self.related_content_urls.clear(); self.special_fields.clear(); } fn default_instance() -> &'static LessonProto { static instance: LessonProto = LessonProto { alt_ids: ::std::vec::Vec::new(), name: ::std::option::Option::None, authors: ::std::vec::Vec::new(), reviewers: ::std::vec::Vec::new(), topics: ::std::vec::Vec::new(), prev_lessons: ::std::vec::Vec::new(), next_lessons: ::std::vec::Vec::new(), related_terms: ::std::vec::Vec::new(), excerpt: ::std::option::Option::None, related_content_urls: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for LessonProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("LessonProto").unwrap()).clone() } } impl ::std::fmt::Display for LessonProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for LessonProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// * /// Knowledge glossary term metadata. /// ///

Term id is inferred from directory name in the filesystem. // @@protoc_insertion_point(message:fonts.TermProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct TermProto { // message fields // @@protoc_insertion_point(field:fonts.TermProto.alt_ids) pub alt_ids: ::std::vec::Vec<::std::string::String>, // @@protoc_insertion_point(field:fonts.TermProto.name) pub name: ::std::option::Option<::std::string::String>, /// * Brief description of the glossary term. // @@protoc_insertion_point(field:fonts.TermProto.excerpt) pub excerpt: ::std::option::Option<::std::string::String>, /// * Ids of related lessons. // @@protoc_insertion_point(field:fonts.TermProto.related_lessons) pub related_lessons: ::std::vec::Vec<::std::string::String>, /// * URLs of related content, for example for use in an iframe. // @@protoc_insertion_point(field:fonts.TermProto.related_content_urls) pub related_content_urls: ::std::vec::Vec<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:fonts.TermProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a TermProto { fn default() -> &'a TermProto { ::default_instance() } } impl TermProto { pub fn new() -> TermProto { ::std::default::Default::default() } // optional string name = 2; pub fn name(&self) -> &str { match self.name.as_ref() { Some(v) => v, None => "", } } pub fn clear_name(&mut self) { self.name = ::std::option::Option::None; } pub fn has_name(&self) -> bool { self.name.is_some() } // Param is passed by value, moved pub fn set_name(&mut self, v: ::std::string::String) { self.name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_name(&mut self) -> &mut ::std::string::String { if self.name.is_none() { self.name = ::std::option::Option::Some(::std::string::String::new()); } self.name.as_mut().unwrap() } // Take field pub fn take_name(&mut self) -> ::std::string::String { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string excerpt = 3; pub fn excerpt(&self) -> &str { match self.excerpt.as_ref() { Some(v) => v, None => "", } } pub fn clear_excerpt(&mut self) { self.excerpt = ::std::option::Option::None; } pub fn has_excerpt(&self) -> bool { self.excerpt.is_some() } // Param is passed by value, moved pub fn set_excerpt(&mut self, v: ::std::string::String) { self.excerpt = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_excerpt(&mut self) -> &mut ::std::string::String { if self.excerpt.is_none() { self.excerpt = ::std::option::Option::Some(::std::string::String::new()); } self.excerpt.as_mut().unwrap() } // Take field pub fn take_excerpt(&mut self) -> ::std::string::String { self.excerpt.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(5); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "alt_ids", |m: &TermProto| { &m.alt_ids }, |m: &mut TermProto| { &mut m.alt_ids }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "name", |m: &TermProto| { &m.name }, |m: &mut TermProto| { &mut m.name }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "excerpt", |m: &TermProto| { &m.excerpt }, |m: &mut TermProto| { &mut m.excerpt }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "related_lessons", |m: &TermProto| { &m.related_lessons }, |m: &mut TermProto| { &mut m.related_lessons }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "related_content_urls", |m: &TermProto| { &m.related_content_urls }, |m: &mut TermProto| { &mut m.related_content_urls }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "TermProto", fields, oneofs, ) } } impl ::protobuf::Message for TermProto { const NAME: &'static str = "TermProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.alt_ids.push(is.read_string()?); }, 18 => { self.name = ::std::option::Option::Some(is.read_string()?); }, 26 => { self.excerpt = ::std::option::Option::Some(is.read_string()?); }, 34 => { self.related_lessons.push(is.read_string()?); }, 42 => { self.related_content_urls.push(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.alt_ids { my_size += ::protobuf::rt::string_size(1, &value); }; if let Some(v) = self.name.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } if let Some(v) = self.excerpt.as_ref() { my_size += ::protobuf::rt::string_size(3, &v); } for value in &self.related_lessons { my_size += ::protobuf::rt::string_size(4, &value); }; for value in &self.related_content_urls { my_size += ::protobuf::rt::string_size(5, &value); }; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.alt_ids { os.write_string(1, &v)?; }; if let Some(v) = self.name.as_ref() { os.write_string(2, v)?; } if let Some(v) = self.excerpt.as_ref() { os.write_string(3, v)?; } for v in &self.related_lessons { os.write_string(4, &v)?; }; for v in &self.related_content_urls { os.write_string(5, &v)?; }; os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> TermProto { TermProto::new() } fn clear(&mut self) { self.alt_ids.clear(); self.name = ::std::option::Option::None; self.excerpt = ::std::option::Option::None; self.related_lessons.clear(); self.related_content_urls.clear(); self.special_fields.clear(); } fn default_instance() -> &'static TermProto { static instance: TermProto = TermProto { alt_ids: ::std::vec::Vec::new(), name: ::std::option::Option::None, excerpt: ::std::option::Option::None, related_lessons: ::std::vec::Vec::new(), related_content_urls: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for TermProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("TermProto").unwrap()).clone() } } impl ::std::fmt::Display for TermProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for TermProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// * /// Knowledge contributor metadata. /// ///

Contributors appear in other Knowledge metadata as authors/reviewers of /// lessons. // @@protoc_insertion_point(message:fonts.ContributorsProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct ContributorsProto { // message fields // @@protoc_insertion_point(field:fonts.ContributorsProto.contributors) pub contributors: ::std::vec::Vec, // special fields // @@protoc_insertion_point(special_field:fonts.ContributorsProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a ContributorsProto { fn default() -> &'a ContributorsProto { ::default_instance() } } impl ContributorsProto { pub fn new() -> ContributorsProto { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "contributors", |m: &ContributorsProto| { &m.contributors }, |m: &mut ContributorsProto| { &mut m.contributors }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "ContributorsProto", fields, oneofs, ) } } impl ::protobuf::Message for ContributorsProto { const NAME: &'static str = "ContributorsProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.contributors.push(is.read_message()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.contributors { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.contributors { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }; os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> ContributorsProto { ContributorsProto::new() } fn clear(&mut self) { self.contributors.clear(); self.special_fields.clear(); } fn default_instance() -> &'static ContributorsProto { static instance: ContributorsProto = ContributorsProto { contributors: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for ContributorsProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("ContributorsProto").unwrap()).clone() } } impl ::std::fmt::Display for ContributorsProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ContributorsProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// Nested message and enums of message `ContributorsProto` pub mod contributors_proto { // @@protoc_insertion_point(message:fonts.ContributorsProto.ContributorProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct ContributorProto { // message fields // @@protoc_insertion_point(field:fonts.ContributorsProto.ContributorProto.name) pub name: ::std::option::Option<::std::string::String>, /// * URL to the person's personal site. // @@protoc_insertion_point(field:fonts.ContributorsProto.ContributorProto.personal_site) pub personal_site: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:fonts.ContributorsProto.ContributorProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a ContributorProto { fn default() -> &'a ContributorProto { ::default_instance() } } impl ContributorProto { pub fn new() -> ContributorProto { ::std::default::Default::default() } // optional string name = 1; pub fn name(&self) -> &str { match self.name.as_ref() { Some(v) => v, None => "", } } pub fn clear_name(&mut self) { self.name = ::std::option::Option::None; } pub fn has_name(&self) -> bool { self.name.is_some() } // Param is passed by value, moved pub fn set_name(&mut self, v: ::std::string::String) { self.name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_name(&mut self) -> &mut ::std::string::String { if self.name.is_none() { self.name = ::std::option::Option::Some(::std::string::String::new()); } self.name.as_mut().unwrap() } // Take field pub fn take_name(&mut self) -> ::std::string::String { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string personal_site = 2; pub fn personal_site(&self) -> &str { match self.personal_site.as_ref() { Some(v) => v, None => "", } } pub fn clear_personal_site(&mut self) { self.personal_site = ::std::option::Option::None; } pub fn has_personal_site(&self) -> bool { self.personal_site.is_some() } // Param is passed by value, moved pub fn set_personal_site(&mut self, v: ::std::string::String) { self.personal_site = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_personal_site(&mut self) -> &mut ::std::string::String { if self.personal_site.is_none() { self.personal_site = ::std::option::Option::Some(::std::string::String::new()); } self.personal_site.as_mut().unwrap() } // Take field pub fn take_personal_site(&mut self) -> ::std::string::String { self.personal_site.take().unwrap_or_else(|| ::std::string::String::new()) } pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(2); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "name", |m: &ContributorProto| { &m.name }, |m: &mut ContributorProto| { &mut m.name }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "personal_site", |m: &ContributorProto| { &m.personal_site }, |m: &mut ContributorProto| { &mut m.personal_site }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "ContributorsProto.ContributorProto", fields, oneofs, ) } } impl ::protobuf::Message for ContributorProto { const NAME: &'static str = "ContributorProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.name = ::std::option::Option::Some(is.read_string()?); }, 18 => { self.personal_site = ::std::option::Option::Some(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.name.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.personal_site.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.name.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.personal_site.as_ref() { os.write_string(2, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> ContributorProto { ContributorProto::new() } fn clear(&mut self) { self.name = ::std::option::Option::None; self.personal_site = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static ContributorProto { static instance: ContributorProto = ContributorProto { name: ::std::option::Option::None, personal_site: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for ContributorProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| super::file_descriptor().message_by_package_relative_name("ContributorsProto.ContributorProto").unwrap()).clone() } } impl ::std::fmt::Display for ContributorProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ContributorProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } } static file_descriptor_proto_data: &'static [u8] = b"\ \n\x0fknowledge.proto\x12\x05fonts\"*\n\x0eKnowledgeProto\x12\x18\n\x07m\ odules\x18\x01\x20\x03(\tR\x07modules\"n\n\x0bModuleProto\x12\x17\n\x07a\ lt_ids\x18\x01\x20\x03(\tR\x06altIds\x12\x12\n\x04name\x18\x02\x20\x01(\ \tR\x04name\x12\x18\n\x07excerpt\x18\x03\x20\x01(\tR\x07excerpt\x12\x18\ \n\x07lessons\x18\x04\x20\x03(\tR\x07lessons\"9\n\nTopicProto\x12\x17\n\ \x07alt_ids\x18\x01\x20\x03(\tR\x06altIds\x12\x12\n\x04name\x18\x02\x20\ \x01(\tR\x04name\"\xc1\x02\n\x0bLessonProto\x12\x17\n\x07alt_ids\x18\x01\ \x20\x03(\tR\x06altIds\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\ \x18\n\x07authors\x18\x03\x20\x03(\tR\x07authors\x12\x1c\n\treviewers\ \x18\x04\x20\x03(\tR\treviewers\x12\x16\n\x06topics\x18\x05\x20\x03(\tR\ \x06topics\x12!\n\x0cprev_lessons\x18\x06\x20\x03(\tR\x0bprevLessons\x12\ !\n\x0cnext_lessons\x18\x07\x20\x03(\tR\x0bnextLessons\x12#\n\rrelated_t\ erms\x18\x08\x20\x03(\tR\x0crelatedTerms\x12\x18\n\x07excerpt\x18\t\x20\ \x01(\tR\x07excerpt\x120\n\x14related_content_urls\x18\n\x20\x03(\tR\x12\ relatedContentUrls\"\xad\x01\n\tTermProto\x12\x17\n\x07alt_ids\x18\x01\ \x20\x03(\tR\x06altIds\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\ \x18\n\x07excerpt\x18\x03\x20\x01(\tR\x07excerpt\x12'\n\x0frelated_lesso\ ns\x18\x04\x20\x03(\tR\x0erelatedLessons\x120\n\x14related_content_urls\ \x18\x05\x20\x03(\tR\x12relatedContentUrls\"\xaf\x01\n\x11ContributorsPr\ oto\x12M\n\x0ccontributors\x18\x01\x20\x03(\x0b2).fonts.ContributorsProt\ o.ContributorProtoR\x0ccontributors\x1aK\n\x10ContributorProto\x12\x12\n\ \x04name\x18\x01\x20\x01(\tR\x04name\x12#\n\rpersonal_site\x18\x02\x20\ \x01(\tR\x0cpersonalSiteB#\n\x16com.google.fonts.protoB\tKnowledgeJ\xaa\ \x19\n\x06\x12\x04\0\0f\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\nO\n\x01\x02\ \x12\x03\x05\0\x0e\x1aE*\n\x20Proto\x20definitions\x20for\x20Fonts\x20Kn\ owledge\x20metadata\x20in\x20the\x20filesystem.\n\n\x08\n\x01\x08\x12\ \x03\x07\0/\n\t\n\x02\x08\x01\x12\x03\x07\0/\n\x08\n\x01\x08\x12\x03\x08\ \0*\n\t\n\x02\x08\x08\x12\x03\x08\0*\n\"\n\x02\x04\0\x12\x04\x0b\0\x0f\ \x01\x1a\x16*\x20Knowledge\x20metadata.\x20\n\n\n\x03\x04\0\x01\x12\x03\ \x0b\x08\x16\n0\n\x04\x04\0\x02\0\x12\x03\r\x02\x1e\x1a\x17*\x20Module\ \x20ids\x20in\x20order.\x20\"\n\x20Next\x20=\x202\n\n\x0c\n\x05\x04\0\ \x02\0\x04\x12\x03\r\x02\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\r\x0b\x11\ \n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\r\x12\x19\n\x0c\n\x05\x04\0\x02\0\ \x03\x12\x03\r\x1c\x1d\nl\n\x02\x04\x01\x12\x04\x16\0\x1e\x01\x1a`*\n\ \x20Knowledge\x20module\x20metadata.\n\n\x20

Module\x20id\x20is\x20inf\ erred\x20from\x20directory\x20name\x20in\x20the\x20filesystem.\n\n\n\n\ \x03\x04\x01\x01\x12\x03\x16\x08\x13\n\x0b\n\x04\x04\x01\x02\0\x12\x03\ \x17\x02\x1e\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03\x17\x02\n\n\x0c\n\x05\ \x04\x01\x02\0\x05\x12\x03\x17\x0b\x11\n\x0c\n\x05\x04\x01\x02\0\x01\x12\ \x03\x17\x12\x19\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x17\x1c\x1d\n\x0b\ \n\x04\x04\x01\x02\x01\x12\x03\x18\x02\x1b\n\x0c\n\x05\x04\x01\x02\x01\ \x04\x12\x03\x18\x02\n\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\x18\x0b\ \x11\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x18\x12\x16\n\x0c\n\x05\x04\ \x01\x02\x01\x03\x12\x03\x18\x19\x1a\n0\n\x04\x04\x01\x02\x02\x12\x03\ \x1a\x02\x1e\x1a#*\x20Brief\x20description\x20of\x20the\x20module.\x20\n\ \x0c\n\x05\x04\x01\x02\x02\x04\x12\x03\x1a\x02\n\n\x0c\n\x05\x04\x01\x02\ \x02\x05\x12\x03\x1a\x0b\x11\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\x1a\ \x12\x19\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\x1a\x1c\x1d\n@\n\x04\ \x04\x01\x02\x03\x12\x03\x1c\x02\x1e\x1a'*\x20Ids\x20of\x20constituent\ \x20lessons\x20in\x20order.\x20\"\n\x20Next\x20=\x205\n\n\x0c\n\x05\x04\ \x01\x02\x03\x04\x12\x03\x1c\x02\n\n\x0c\n\x05\x04\x01\x02\x03\x05\x12\ \x03\x1c\x0b\x11\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03\x1c\x12\x19\n\ \x0c\n\x05\x04\x01\x02\x03\x03\x12\x03\x1c\x1c\x1d\nj\n\x02\x04\x02\x12\ \x04%\0)\x01\x1a^*\n\x20Knowledge\x20topic\x20metadata.\n\n\x20

Topic\ \x20id\x20is\x20inferred\x20from\x20directory\x20name\x20in\x20the\x20fi\ lesystem.\n\n\n\n\x03\x04\x02\x01\x12\x03%\x08\x12\n\x0b\n\x04\x04\x02\ \x02\0\x12\x03&\x02\x1e\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03&\x02\n\n\ \x0c\n\x05\x04\x02\x02\0\x05\x12\x03&\x0b\x11\n\x0c\n\x05\x04\x02\x02\0\ \x01\x12\x03&\x12\x19\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03&\x1c\x1d\n\ \x17\n\x04\x04\x02\x02\x01\x12\x03'\x02\x1b\"\n\x20Next\x20=\x203\n\n\ \x0c\n\x05\x04\x02\x02\x01\x04\x12\x03'\x02\n\n\x0c\n\x05\x04\x02\x02\ \x01\x05\x12\x03'\x0b\x11\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03'\x12\ \x16\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03'\x19\x1a\n\x89\x01\n\x02\ \x04\x03\x12\x041\0C\x01\x1a}*\n\x20Knowledge\x20lesson\x20metadata.\n\n\ \x20

Lesson\x20id,\x20as\x20well\x20as\x20id\x20of\x20the\x20parent\ \x20module,\x20are\x20inferred\x20from\x20path\x20in\n\x20the\x20filesys\ tem.\n\n\n\n\x03\x04\x03\x01\x12\x031\x08\x13\n\x0b\n\x04\x04\x03\x02\0\ \x12\x032\x02\x1e\n\x0c\n\x05\x04\x03\x02\0\x04\x12\x032\x02\n\n\x0c\n\ \x05\x04\x03\x02\0\x05\x12\x032\x0b\x11\n\x0c\n\x05\x04\x03\x02\0\x01\ \x12\x032\x12\x19\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x032\x1c\x1d\n\x0b\n\ \x04\x04\x03\x02\x01\x12\x033\x02\x1b\n\x0c\n\x05\x04\x03\x02\x01\x04\ \x12\x033\x02\n\n\x0c\n\x05\x04\x03\x02\x01\x05\x12\x033\x0b\x11\n\x0c\n\ \x05\x04\x03\x02\x01\x01\x12\x033\x12\x16\n\x0c\n\x05\x04\x03\x02\x01\ \x03\x12\x033\x19\x1a\n\x0b\n\x04\x04\x03\x02\x02\x12\x034\x02\x1e\n\x0c\ \n\x05\x04\x03\x02\x02\x04\x12\x034\x02\n\n\x0c\n\x05\x04\x03\x02\x02\ \x05\x12\x034\x0b\x11\n\x0c\n\x05\x04\x03\x02\x02\x01\x12\x034\x12\x19\n\ \x0c\n\x05\x04\x03\x02\x02\x03\x12\x034\x1c\x1d\n\x0b\n\x04\x04\x03\x02\ \x03\x12\x035\x02\x20\n\x0c\n\x05\x04\x03\x02\x03\x04\x12\x035\x02\n\n\ \x0c\n\x05\x04\x03\x02\x03\x05\x12\x035\x0b\x11\n\x0c\n\x05\x04\x03\x02\ \x03\x01\x12\x035\x12\x1b\n\x0c\n\x05\x04\x03\x02\x03\x03\x12\x035\x1e\ \x1f\n%\n\x04\x04\x03\x02\x04\x12\x037\x02\x1d\x1a\x18*\x20Ids\x20of\x20\ tagged\x20topics.\x20\n\x0c\n\x05\x04\x03\x02\x04\x04\x12\x037\x02\n\n\ \x0c\n\x05\x04\x03\x02\x04\x05\x12\x037\x0b\x11\n\x0c\n\x05\x04\x03\x02\ \x04\x01\x12\x037\x12\x18\n\x0c\n\x05\x04\x03\x02\x04\x03\x12\x037\x1b\ \x1c\n7\n\x04\x04\x03\x02\x05\x12\x039\x02#\x1a**\x20Ids\x20of\x20lesson\ s\x20to\x20read\x20before\x20this\x20one.\x20\n\x0c\n\x05\x04\x03\x02\ \x05\x04\x12\x039\x02\n\n\x0c\n\x05\x04\x03\x02\x05\x05\x12\x039\x0b\x11\ \n\x0c\n\x05\x04\x03\x02\x05\x01\x12\x039\x12\x1e\n\x0c\n\x05\x04\x03\ \x02\x05\x03\x12\x039!\"\n6\n\x04\x04\x03\x02\x06\x12\x03;\x02#\x1a)*\ \x20Ids\x20of\x20lessons\x20to\x20read\x20after\x20this\x20one.\x20\n\ \x0c\n\x05\x04\x03\x02\x06\x04\x12\x03;\x02\n\n\x0c\n\x05\x04\x03\x02\ \x06\x05\x12\x03;\x0b\x11\n\x0c\n\x05\x04\x03\x02\x06\x01\x12\x03;\x12\ \x1e\n\x0c\n\x05\x04\x03\x02\x06\x03\x12\x03;!\"\n.\n\x04\x04\x03\x02\ \x07\x12\x03=\x02$\x1a!*\x20Ids\x20of\x20related\x20glossary\x20terms.\ \x20\n\x0c\n\x05\x04\x03\x02\x07\x04\x12\x03=\x02\n\n\x0c\n\x05\x04\x03\ \x02\x07\x05\x12\x03=\x0b\x11\n\x0c\n\x05\x04\x03\x02\x07\x01\x12\x03=\ \x12\x1f\n\x0c\n\x05\x04\x03\x02\x07\x03\x12\x03=\"#\n0\n\x04\x04\x03\ \x02\x08\x12\x03?\x02\x1e\x1a#*\x20Brief\x20description\x20of\x20the\x20\ lesson.\x20\n\x0c\n\x05\x04\x03\x02\x08\x04\x12\x03?\x02\n\n\x0c\n\x05\ \x04\x03\x02\x08\x05\x12\x03?\x0b\x11\n\x0c\n\x05\x04\x03\x02\x08\x01\ \x12\x03?\x12\x19\n\x0c\n\x05\x04\x03\x02\x08\x03\x12\x03?\x1c\x1d\nW\n\ \x04\x04\x03\x02\t\x12\x03A\x02,\x1a=*\x20URLs\x20of\x20related\x20conte\ nt,\x20for\x20example\x20for\x20use\x20in\x20an\x20iframe.\x20\"\x0b\x20\ Next\x20=\x2011\n\n\x0c\n\x05\x04\x03\x02\t\x04\x12\x03A\x02\n\n\x0c\n\ \x05\x04\x03\x02\t\x05\x12\x03A\x0b\x11\n\x0c\n\x05\x04\x03\x02\t\x01\ \x12\x03A\x12&\n\x0c\n\x05\x04\x03\x02\t\x03\x12\x03A)+\nq\n\x02\x04\x04\ \x12\x04J\0T\x01\x1ae*\n\x20Knowledge\x20glossary\x20term\x20metadata.\n\ \n\x20

Term\x20id\x20is\x20inferred\x20from\x20directory\x20name\x20in\ \x20the\x20filesystem.\n\n\n\n\x03\x04\x04\x01\x12\x03J\x08\x11\n\x0b\n\ \x04\x04\x04\x02\0\x12\x03K\x02\x1e\n\x0c\n\x05\x04\x04\x02\0\x04\x12\ \x03K\x02\n\n\x0c\n\x05\x04\x04\x02\0\x05\x12\x03K\x0b\x11\n\x0c\n\x05\ \x04\x04\x02\0\x01\x12\x03K\x12\x19\n\x0c\n\x05\x04\x04\x02\0\x03\x12\ \x03K\x1c\x1d\n\x0b\n\x04\x04\x04\x02\x01\x12\x03L\x02\x1b\n\x0c\n\x05\ \x04\x04\x02\x01\x04\x12\x03L\x02\n\n\x0c\n\x05\x04\x04\x02\x01\x05\x12\ \x03L\x0b\x11\n\x0c\n\x05\x04\x04\x02\x01\x01\x12\x03L\x12\x16\n\x0c\n\ \x05\x04\x04\x02\x01\x03\x12\x03L\x19\x1a\n7\n\x04\x04\x04\x02\x02\x12\ \x03N\x02\x1e\x1a**\x20Brief\x20description\x20of\x20the\x20glossary\x20\ term.\x20\n\x0c\n\x05\x04\x04\x02\x02\x04\x12\x03N\x02\n\n\x0c\n\x05\x04\ \x04\x02\x02\x05\x12\x03N\x0b\x11\n\x0c\n\x05\x04\x04\x02\x02\x01\x12\ \x03N\x12\x19\n\x0c\n\x05\x04\x04\x02\x02\x03\x12\x03N\x1c\x1d\n'\n\x04\ \x04\x04\x02\x03\x12\x03P\x02&\x1a\x1a*\x20Ids\x20of\x20related\x20lesso\ ns.\x20\n\x0c\n\x05\x04\x04\x02\x03\x04\x12\x03P\x02\n\n\x0c\n\x05\x04\ \x04\x02\x03\x05\x12\x03P\x0b\x11\n\x0c\n\x05\x04\x04\x02\x03\x01\x12\ \x03P\x12!\n\x0c\n\x05\x04\x04\x02\x03\x03\x12\x03P$%\nV\n\x04\x04\x04\ \x02\x04\x12\x03R\x02+\x1a=*\x20URLs\x20of\x20related\x20content,\x20for\ \x20example\x20for\x20use\x20in\x20an\x20iframe.\x20\"\n\x20Next\x20=\ \x206\n\n\x0c\n\x05\x04\x04\x02\x04\x04\x12\x03R\x02\n\n\x0c\n\x05\x04\ \x04\x02\x04\x05\x12\x03R\x0b\x11\n\x0c\n\x05\x04\x04\x02\x04\x01\x12\ \x03R\x12&\n\x0c\n\x05\x04\x04\x02\x04\x03\x12\x03R)*\n\x86\x01\n\x02\ \x04\x05\x12\x04\\\0f\x01\x1az*\n\x20Knowledge\x20contributor\x20metadat\ a.\n\n\x20

Contributors\x20appear\x20in\x20other\x20Knowledge\x20metad\ ata\x20as\x20authors/reviewers\x20of\n\x20lessons.\n\n\n\n\x03\x04\x05\ \x01\x12\x03\\\x08\x19\n\x17\n\x04\x04\x05\x02\0\x12\x03]\x02-\"\n\x20Ne\ xt\x20=\x202\n\n\x0c\n\x05\x04\x05\x02\0\x04\x12\x03]\x02\n\n\x0c\n\x05\ \x04\x05\x02\0\x06\x12\x03]\x0b\x1b\n\x0c\n\x05\x04\x05\x02\0\x01\x12\ \x03]\x1c(\n\x0c\n\x05\x04\x05\x02\0\x03\x12\x03]+,\n\x0c\n\x04\x04\x05\ \x03\0\x12\x04`\x02e\x03\n\x0c\n\x05\x04\x05\x03\0\x01\x12\x03`\n\x1a\n\ \r\n\x06\x04\x05\x03\0\x02\0\x12\x03a\x04\x1d\n\x0e\n\x07\x04\x05\x03\0\ \x02\0\x04\x12\x03a\x04\x0c\n\x0e\n\x07\x04\x05\x03\0\x02\0\x05\x12\x03a\ \r\x13\n\x0e\n\x07\x04\x05\x03\0\x02\0\x01\x12\x03a\x14\x18\n\x0e\n\x07\ \x04\x05\x03\0\x02\0\x03\x12\x03a\x1b\x1c\n@\n\x06\x04\x05\x03\0\x02\x01\ \x12\x03c\x04&\x1a%*\x20URL\x20to\x20the\x20person's\x20personal\x20site\ .\x20\"\n\x20Next\x20=\x203\n\n\x0e\n\x07\x04\x05\x03\0\x02\x01\x04\x12\ \x03c\x04\x0c\n\x0e\n\x07\x04\x05\x03\0\x02\x01\x05\x12\x03c\r\x13\n\x0e\ \n\x07\x04\x05\x03\0\x02\x01\x01\x12\x03c\x14!\n\x0e\n\x07\x04\x05\x03\0\ \x02\x01\x03\x12\x03c$%\ "; /// `FileDescriptorProto` object which was a source for this generated file fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); file_descriptor_proto_lazy.get(|| { ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() }) } /// `FileDescriptor` object which allows dynamic access to files pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); file_descriptor.get(|| { let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { let mut deps = ::std::vec::Vec::with_capacity(0); let mut messages = ::std::vec::Vec::with_capacity(7); messages.push(KnowledgeProto::generated_message_descriptor_data()); messages.push(ModuleProto::generated_message_descriptor_data()); messages.push(TopicProto::generated_message_descriptor_data()); messages.push(LessonProto::generated_message_descriptor_data()); messages.push(TermProto::generated_message_descriptor_data()); messages.push(ContributorsProto::generated_message_descriptor_data()); messages.push(contributors_proto::ContributorProto::generated_message_descriptor_data()); let mut enums = ::std::vec::Vec::with_capacity(0); ::protobuf::reflect::GeneratedFileDescriptor::new_generated( file_descriptor_proto(), deps, messages, enums, ) }); ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } googlefonts-gf-metadata-5fa0932/src/languages_public.rs000066400000000000000000003201421521447034200232100ustar00rootroot00000000000000// This file is generated by rust-protobuf 3.7.2. Do not edit // .proto file is parsed by protoc --rs_out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![cfg_attr(rustfmt, rustfmt::skip)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(trivial_casts)] #![allow(unused_results)] #![allow(unused_mut)] //! Generated file from `languages_public.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; /// A region or territory as defined in the CLDR // @@protoc_insertion_point(message:google.languages_public.RegionProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct RegionProto { // message fields // @@protoc_insertion_point(field:google.languages_public.RegionProto.id) pub id: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.RegionProto.name) pub name: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.RegionProto.population) pub population: ::std::option::Option, // @@protoc_insertion_point(field:google.languages_public.RegionProto.region_group) pub region_group: ::std::vec::Vec<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:google.languages_public.RegionProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a RegionProto { fn default() -> &'a RegionProto { ::default_instance() } } impl RegionProto { pub fn new() -> RegionProto { ::std::default::Default::default() } // optional string id = 1; pub fn id(&self) -> &str { match self.id.as_ref() { Some(v) => v, None => "", } } pub fn clear_id(&mut self) { self.id = ::std::option::Option::None; } pub fn has_id(&self) -> bool { self.id.is_some() } // Param is passed by value, moved pub fn set_id(&mut self, v: ::std::string::String) { self.id = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_id(&mut self) -> &mut ::std::string::String { if self.id.is_none() { self.id = ::std::option::Option::Some(::std::string::String::new()); } self.id.as_mut().unwrap() } // Take field pub fn take_id(&mut self) -> ::std::string::String { self.id.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string name = 2; pub fn name(&self) -> &str { match self.name.as_ref() { Some(v) => v, None => "", } } pub fn clear_name(&mut self) { self.name = ::std::option::Option::None; } pub fn has_name(&self) -> bool { self.name.is_some() } // Param is passed by value, moved pub fn set_name(&mut self, v: ::std::string::String) { self.name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_name(&mut self) -> &mut ::std::string::String { if self.name.is_none() { self.name = ::std::option::Option::Some(::std::string::String::new()); } self.name.as_mut().unwrap() } // Take field pub fn take_name(&mut self) -> ::std::string::String { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } // optional int32 population = 3; pub fn population(&self) -> i32 { self.population.unwrap_or(0) } pub fn clear_population(&mut self) { self.population = ::std::option::Option::None; } pub fn has_population(&self) -> bool { self.population.is_some() } // Param is passed by value, moved pub fn set_population(&mut self, v: i32) { self.population = ::std::option::Option::Some(v); } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(4); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "id", |m: &RegionProto| { &m.id }, |m: &mut RegionProto| { &mut m.id }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "name", |m: &RegionProto| { &m.name }, |m: &mut RegionProto| { &mut m.name }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "population", |m: &RegionProto| { &m.population }, |m: &mut RegionProto| { &mut m.population }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "region_group", |m: &RegionProto| { &m.region_group }, |m: &mut RegionProto| { &mut m.region_group }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "RegionProto", fields, oneofs, ) } } impl ::protobuf::Message for RegionProto { const NAME: &'static str = "RegionProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.id = ::std::option::Option::Some(is.read_string()?); }, 18 => { self.name = ::std::option::Option::Some(is.read_string()?); }, 24 => { self.population = ::std::option::Option::Some(is.read_int32()?); }, 34 => { self.region_group.push(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.id.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.name.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } if let Some(v) = self.population { my_size += ::protobuf::rt::int32_size(3, v); } for value in &self.region_group { my_size += ::protobuf::rt::string_size(4, &value); }; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.id.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.name.as_ref() { os.write_string(2, v)?; } if let Some(v) = self.population { os.write_int32(3, v)?; } for v in &self.region_group { os.write_string(4, &v)?; }; os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> RegionProto { RegionProto::new() } fn clear(&mut self) { self.id = ::std::option::Option::None; self.name = ::std::option::Option::None; self.population = ::std::option::Option::None; self.region_group.clear(); self.special_fields.clear(); } fn default_instance() -> &'static RegionProto { static instance: RegionProto = RegionProto { id: ::std::option::Option::None, name: ::std::option::Option::None, population: ::std::option::Option::None, region_group: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for RegionProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("RegionProto").unwrap()).clone() } } impl ::std::fmt::Display for RegionProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for RegionProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:google.languages_public.ScriptProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct ScriptProto { // message fields // @@protoc_insertion_point(field:google.languages_public.ScriptProto.id) pub id: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.ScriptProto.name) pub name: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.ScriptProto.historical) pub historical: ::std::option::Option, // @@protoc_insertion_point(field:google.languages_public.ScriptProto.fictional) pub fictional: ::std::option::Option, // @@protoc_insertion_point(field:google.languages_public.ScriptProto.family) pub family: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.ScriptProto.summary) pub summary: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:google.languages_public.ScriptProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a ScriptProto { fn default() -> &'a ScriptProto { ::default_instance() } } impl ScriptProto { pub fn new() -> ScriptProto { ::std::default::Default::default() } // optional string id = 1; pub fn id(&self) -> &str { match self.id.as_ref() { Some(v) => v, None => "", } } pub fn clear_id(&mut self) { self.id = ::std::option::Option::None; } pub fn has_id(&self) -> bool { self.id.is_some() } // Param is passed by value, moved pub fn set_id(&mut self, v: ::std::string::String) { self.id = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_id(&mut self) -> &mut ::std::string::String { if self.id.is_none() { self.id = ::std::option::Option::Some(::std::string::String::new()); } self.id.as_mut().unwrap() } // Take field pub fn take_id(&mut self) -> ::std::string::String { self.id.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string name = 2; pub fn name(&self) -> &str { match self.name.as_ref() { Some(v) => v, None => "", } } pub fn clear_name(&mut self) { self.name = ::std::option::Option::None; } pub fn has_name(&self) -> bool { self.name.is_some() } // Param is passed by value, moved pub fn set_name(&mut self, v: ::std::string::String) { self.name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_name(&mut self) -> &mut ::std::string::String { if self.name.is_none() { self.name = ::std::option::Option::Some(::std::string::String::new()); } self.name.as_mut().unwrap() } // Take field pub fn take_name(&mut self) -> ::std::string::String { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } // optional bool historical = 3; pub fn historical(&self) -> bool { self.historical.unwrap_or(false) } pub fn clear_historical(&mut self) { self.historical = ::std::option::Option::None; } pub fn has_historical(&self) -> bool { self.historical.is_some() } // Param is passed by value, moved pub fn set_historical(&mut self, v: bool) { self.historical = ::std::option::Option::Some(v); } // optional bool fictional = 4; pub fn fictional(&self) -> bool { self.fictional.unwrap_or(false) } pub fn clear_fictional(&mut self) { self.fictional = ::std::option::Option::None; } pub fn has_fictional(&self) -> bool { self.fictional.is_some() } // Param is passed by value, moved pub fn set_fictional(&mut self, v: bool) { self.fictional = ::std::option::Option::Some(v); } // optional string family = 5; pub fn family(&self) -> &str { match self.family.as_ref() { Some(v) => v, None => "", } } pub fn clear_family(&mut self) { self.family = ::std::option::Option::None; } pub fn has_family(&self) -> bool { self.family.is_some() } // Param is passed by value, moved pub fn set_family(&mut self, v: ::std::string::String) { self.family = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_family(&mut self) -> &mut ::std::string::String { if self.family.is_none() { self.family = ::std::option::Option::Some(::std::string::String::new()); } self.family.as_mut().unwrap() } // Take field pub fn take_family(&mut self) -> ::std::string::String { self.family.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string summary = 6; pub fn summary(&self) -> &str { match self.summary.as_ref() { Some(v) => v, None => "", } } pub fn clear_summary(&mut self) { self.summary = ::std::option::Option::None; } pub fn has_summary(&self) -> bool { self.summary.is_some() } // Param is passed by value, moved pub fn set_summary(&mut self, v: ::std::string::String) { self.summary = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_summary(&mut self) -> &mut ::std::string::String { if self.summary.is_none() { self.summary = ::std::option::Option::Some(::std::string::String::new()); } self.summary.as_mut().unwrap() } // Take field pub fn take_summary(&mut self) -> ::std::string::String { self.summary.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(6); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "id", |m: &ScriptProto| { &m.id }, |m: &mut ScriptProto| { &mut m.id }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "name", |m: &ScriptProto| { &m.name }, |m: &mut ScriptProto| { &mut m.name }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "historical", |m: &ScriptProto| { &m.historical }, |m: &mut ScriptProto| { &mut m.historical }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "fictional", |m: &ScriptProto| { &m.fictional }, |m: &mut ScriptProto| { &mut m.fictional }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "family", |m: &ScriptProto| { &m.family }, |m: &mut ScriptProto| { &mut m.family }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "summary", |m: &ScriptProto| { &m.summary }, |m: &mut ScriptProto| { &mut m.summary }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "ScriptProto", fields, oneofs, ) } } impl ::protobuf::Message for ScriptProto { const NAME: &'static str = "ScriptProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.id = ::std::option::Option::Some(is.read_string()?); }, 18 => { self.name = ::std::option::Option::Some(is.read_string()?); }, 24 => { self.historical = ::std::option::Option::Some(is.read_bool()?); }, 32 => { self.fictional = ::std::option::Option::Some(is.read_bool()?); }, 42 => { self.family = ::std::option::Option::Some(is.read_string()?); }, 50 => { self.summary = ::std::option::Option::Some(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.id.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.name.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } if let Some(v) = self.historical { my_size += 1 + 1; } if let Some(v) = self.fictional { my_size += 1 + 1; } if let Some(v) = self.family.as_ref() { my_size += ::protobuf::rt::string_size(5, &v); } if let Some(v) = self.summary.as_ref() { my_size += ::protobuf::rt::string_size(6, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.id.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.name.as_ref() { os.write_string(2, v)?; } if let Some(v) = self.historical { os.write_bool(3, v)?; } if let Some(v) = self.fictional { os.write_bool(4, v)?; } if let Some(v) = self.family.as_ref() { os.write_string(5, v)?; } if let Some(v) = self.summary.as_ref() { os.write_string(6, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> ScriptProto { ScriptProto::new() } fn clear(&mut self) { self.id = ::std::option::Option::None; self.name = ::std::option::Option::None; self.historical = ::std::option::Option::None; self.fictional = ::std::option::Option::None; self.family = ::std::option::Option::None; self.summary = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static ScriptProto { static instance: ScriptProto = ScriptProto { id: ::std::option::Option::None, name: ::std::option::Option::None, historical: ::std::option::Option::None, fictional: ::std::option::Option::None, family: ::std::option::Option::None, summary: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for ScriptProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("ScriptProto").unwrap()).clone() } } impl ::std::fmt::Display for ScriptProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ScriptProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:google.languages_public.LanguageProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct LanguageProto { // message fields // @@protoc_insertion_point(field:google.languages_public.LanguageProto.id) pub id: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.LanguageProto.language) pub language: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.LanguageProto.script) pub script: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.LanguageProto.name) pub name: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.LanguageProto.preferred_name) pub preferred_name: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.LanguageProto.autonym) pub autonym: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.LanguageProto.population) pub population: ::std::option::Option, // @@protoc_insertion_point(field:google.languages_public.LanguageProto.region) pub region: ::std::vec::Vec<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.LanguageProto.exemplar_chars) pub exemplar_chars: ::protobuf::MessageField, // @@protoc_insertion_point(field:google.languages_public.LanguageProto.sample_text) pub sample_text: ::protobuf::MessageField, // @@protoc_insertion_point(field:google.languages_public.LanguageProto.historical) pub historical: ::std::option::Option, // @@protoc_insertion_point(field:google.languages_public.LanguageProto.source) pub source: ::std::vec::Vec<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.LanguageProto.note) pub note: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:google.languages_public.LanguageProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a LanguageProto { fn default() -> &'a LanguageProto { ::default_instance() } } impl LanguageProto { pub fn new() -> LanguageProto { ::std::default::Default::default() } // optional string id = 1; pub fn id(&self) -> &str { match self.id.as_ref() { Some(v) => v, None => "", } } pub fn clear_id(&mut self) { self.id = ::std::option::Option::None; } pub fn has_id(&self) -> bool { self.id.is_some() } // Param is passed by value, moved pub fn set_id(&mut self, v: ::std::string::String) { self.id = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_id(&mut self) -> &mut ::std::string::String { if self.id.is_none() { self.id = ::std::option::Option::Some(::std::string::String::new()); } self.id.as_mut().unwrap() } // Take field pub fn take_id(&mut self) -> ::std::string::String { self.id.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string language = 2; pub fn language(&self) -> &str { match self.language.as_ref() { Some(v) => v, None => "", } } pub fn clear_language(&mut self) { self.language = ::std::option::Option::None; } pub fn has_language(&self) -> bool { self.language.is_some() } // Param is passed by value, moved pub fn set_language(&mut self, v: ::std::string::String) { self.language = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_language(&mut self) -> &mut ::std::string::String { if self.language.is_none() { self.language = ::std::option::Option::Some(::std::string::String::new()); } self.language.as_mut().unwrap() } // Take field pub fn take_language(&mut self) -> ::std::string::String { self.language.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string script = 3; pub fn script(&self) -> &str { match self.script.as_ref() { Some(v) => v, None => "", } } pub fn clear_script(&mut self) { self.script = ::std::option::Option::None; } pub fn has_script(&self) -> bool { self.script.is_some() } // Param is passed by value, moved pub fn set_script(&mut self, v: ::std::string::String) { self.script = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_script(&mut self) -> &mut ::std::string::String { if self.script.is_none() { self.script = ::std::option::Option::Some(::std::string::String::new()); } self.script.as_mut().unwrap() } // Take field pub fn take_script(&mut self) -> ::std::string::String { self.script.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string name = 4; pub fn name(&self) -> &str { match self.name.as_ref() { Some(v) => v, None => "", } } pub fn clear_name(&mut self) { self.name = ::std::option::Option::None; } pub fn has_name(&self) -> bool { self.name.is_some() } // Param is passed by value, moved pub fn set_name(&mut self, v: ::std::string::String) { self.name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_name(&mut self) -> &mut ::std::string::String { if self.name.is_none() { self.name = ::std::option::Option::Some(::std::string::String::new()); } self.name.as_mut().unwrap() } // Take field pub fn take_name(&mut self) -> ::std::string::String { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string preferred_name = 5; pub fn preferred_name(&self) -> &str { match self.preferred_name.as_ref() { Some(v) => v, None => "", } } pub fn clear_preferred_name(&mut self) { self.preferred_name = ::std::option::Option::None; } pub fn has_preferred_name(&self) -> bool { self.preferred_name.is_some() } // Param is passed by value, moved pub fn set_preferred_name(&mut self, v: ::std::string::String) { self.preferred_name = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_preferred_name(&mut self) -> &mut ::std::string::String { if self.preferred_name.is_none() { self.preferred_name = ::std::option::Option::Some(::std::string::String::new()); } self.preferred_name.as_mut().unwrap() } // Take field pub fn take_preferred_name(&mut self) -> ::std::string::String { self.preferred_name.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string autonym = 6; pub fn autonym(&self) -> &str { match self.autonym.as_ref() { Some(v) => v, None => "", } } pub fn clear_autonym(&mut self) { self.autonym = ::std::option::Option::None; } pub fn has_autonym(&self) -> bool { self.autonym.is_some() } // Param is passed by value, moved pub fn set_autonym(&mut self, v: ::std::string::String) { self.autonym = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_autonym(&mut self) -> &mut ::std::string::String { if self.autonym.is_none() { self.autonym = ::std::option::Option::Some(::std::string::String::new()); } self.autonym.as_mut().unwrap() } // Take field pub fn take_autonym(&mut self) -> ::std::string::String { self.autonym.take().unwrap_or_else(|| ::std::string::String::new()) } // optional int32 population = 7; pub fn population(&self) -> i32 { self.population.unwrap_or(0) } pub fn clear_population(&mut self) { self.population = ::std::option::Option::None; } pub fn has_population(&self) -> bool { self.population.is_some() } // Param is passed by value, moved pub fn set_population(&mut self, v: i32) { self.population = ::std::option::Option::Some(v); } // optional bool historical = 11; pub fn historical(&self) -> bool { self.historical.unwrap_or(false) } pub fn clear_historical(&mut self) { self.historical = ::std::option::Option::None; } pub fn has_historical(&self) -> bool { self.historical.is_some() } // Param is passed by value, moved pub fn set_historical(&mut self, v: bool) { self.historical = ::std::option::Option::Some(v); } // optional string note = 13; pub fn note(&self) -> &str { match self.note.as_ref() { Some(v) => v, None => "", } } pub fn clear_note(&mut self) { self.note = ::std::option::Option::None; } pub fn has_note(&self) -> bool { self.note.is_some() } // Param is passed by value, moved pub fn set_note(&mut self, v: ::std::string::String) { self.note = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_note(&mut self) -> &mut ::std::string::String { if self.note.is_none() { self.note = ::std::option::Option::Some(::std::string::String::new()); } self.note.as_mut().unwrap() } // Take field pub fn take_note(&mut self) -> ::std::string::String { self.note.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(13); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "id", |m: &LanguageProto| { &m.id }, |m: &mut LanguageProto| { &mut m.id }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "language", |m: &LanguageProto| { &m.language }, |m: &mut LanguageProto| { &mut m.language }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "script", |m: &LanguageProto| { &m.script }, |m: &mut LanguageProto| { &mut m.script }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "name", |m: &LanguageProto| { &m.name }, |m: &mut LanguageProto| { &mut m.name }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "preferred_name", |m: &LanguageProto| { &m.preferred_name }, |m: &mut LanguageProto| { &mut m.preferred_name }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "autonym", |m: &LanguageProto| { &m.autonym }, |m: &mut LanguageProto| { &mut m.autonym }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "population", |m: &LanguageProto| { &m.population }, |m: &mut LanguageProto| { &mut m.population }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "region", |m: &LanguageProto| { &m.region }, |m: &mut LanguageProto| { &mut m.region }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ExemplarCharsProto>( "exemplar_chars", |m: &LanguageProto| { &m.exemplar_chars }, |m: &mut LanguageProto| { &mut m.exemplar_chars }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, SampleTextProto>( "sample_text", |m: &LanguageProto| { &m.sample_text }, |m: &mut LanguageProto| { &mut m.sample_text }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "historical", |m: &LanguageProto| { &m.historical }, |m: &mut LanguageProto| { &mut m.historical }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "source", |m: &LanguageProto| { &m.source }, |m: &mut LanguageProto| { &mut m.source }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "note", |m: &LanguageProto| { &m.note }, |m: &mut LanguageProto| { &mut m.note }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "LanguageProto", fields, oneofs, ) } } impl ::protobuf::Message for LanguageProto { const NAME: &'static str = "LanguageProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.id = ::std::option::Option::Some(is.read_string()?); }, 18 => { self.language = ::std::option::Option::Some(is.read_string()?); }, 26 => { self.script = ::std::option::Option::Some(is.read_string()?); }, 34 => { self.name = ::std::option::Option::Some(is.read_string()?); }, 42 => { self.preferred_name = ::std::option::Option::Some(is.read_string()?); }, 50 => { self.autonym = ::std::option::Option::Some(is.read_string()?); }, 56 => { self.population = ::std::option::Option::Some(is.read_int32()?); }, 66 => { self.region.push(is.read_string()?); }, 74 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.exemplar_chars)?; }, 82 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.sample_text)?; }, 88 => { self.historical = ::std::option::Option::Some(is.read_bool()?); }, 98 => { self.source.push(is.read_string()?); }, 106 => { self.note = ::std::option::Option::Some(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.id.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.language.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } if let Some(v) = self.script.as_ref() { my_size += ::protobuf::rt::string_size(3, &v); } if let Some(v) = self.name.as_ref() { my_size += ::protobuf::rt::string_size(4, &v); } if let Some(v) = self.preferred_name.as_ref() { my_size += ::protobuf::rt::string_size(5, &v); } if let Some(v) = self.autonym.as_ref() { my_size += ::protobuf::rt::string_size(6, &v); } if let Some(v) = self.population { my_size += ::protobuf::rt::int32_size(7, v); } for value in &self.region { my_size += ::protobuf::rt::string_size(8, &value); }; if let Some(v) = self.exemplar_chars.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let Some(v) = self.sample_text.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let Some(v) = self.historical { my_size += 1 + 1; } for value in &self.source { my_size += ::protobuf::rt::string_size(12, &value); }; if let Some(v) = self.note.as_ref() { my_size += ::protobuf::rt::string_size(13, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.id.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.language.as_ref() { os.write_string(2, v)?; } if let Some(v) = self.script.as_ref() { os.write_string(3, v)?; } if let Some(v) = self.name.as_ref() { os.write_string(4, v)?; } if let Some(v) = self.preferred_name.as_ref() { os.write_string(5, v)?; } if let Some(v) = self.autonym.as_ref() { os.write_string(6, v)?; } if let Some(v) = self.population { os.write_int32(7, v)?; } for v in &self.region { os.write_string(8, &v)?; }; if let Some(v) = self.exemplar_chars.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?; } if let Some(v) = self.sample_text.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?; } if let Some(v) = self.historical { os.write_bool(11, v)?; } for v in &self.source { os.write_string(12, &v)?; }; if let Some(v) = self.note.as_ref() { os.write_string(13, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> LanguageProto { LanguageProto::new() } fn clear(&mut self) { self.id = ::std::option::Option::None; self.language = ::std::option::Option::None; self.script = ::std::option::Option::None; self.name = ::std::option::Option::None; self.preferred_name = ::std::option::Option::None; self.autonym = ::std::option::Option::None; self.population = ::std::option::Option::None; self.region.clear(); self.exemplar_chars.clear(); self.sample_text.clear(); self.historical = ::std::option::Option::None; self.source.clear(); self.note = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static LanguageProto { static instance: LanguageProto = LanguageProto { id: ::std::option::Option::None, language: ::std::option::Option::None, script: ::std::option::Option::None, name: ::std::option::Option::None, preferred_name: ::std::option::Option::None, autonym: ::std::option::Option::None, population: ::std::option::Option::None, region: ::std::vec::Vec::new(), exemplar_chars: ::protobuf::MessageField::none(), sample_text: ::protobuf::MessageField::none(), historical: ::std::option::Option::None, source: ::std::vec::Vec::new(), note: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for LanguageProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("LanguageProto").unwrap()).clone() } } impl ::std::fmt::Display for LanguageProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for LanguageProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// Space-separated lists of characters representative of a given language. // @@protoc_insertion_point(message:google.languages_public.ExemplarCharsProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct ExemplarCharsProto { // message fields // @@protoc_insertion_point(field:google.languages_public.ExemplarCharsProto.base) pub base: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.ExemplarCharsProto.auxiliary) pub auxiliary: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.ExemplarCharsProto.marks) pub marks: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.ExemplarCharsProto.numerals) pub numerals: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.ExemplarCharsProto.punctuation) pub punctuation: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.ExemplarCharsProto.index) pub index: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.ExemplarCharsProto.not_required) pub not_required: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:google.languages_public.ExemplarCharsProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a ExemplarCharsProto { fn default() -> &'a ExemplarCharsProto { ::default_instance() } } impl ExemplarCharsProto { pub fn new() -> ExemplarCharsProto { ::std::default::Default::default() } // optional string base = 1; pub fn base(&self) -> &str { match self.base.as_ref() { Some(v) => v, None => "", } } pub fn clear_base(&mut self) { self.base = ::std::option::Option::None; } pub fn has_base(&self) -> bool { self.base.is_some() } // Param is passed by value, moved pub fn set_base(&mut self, v: ::std::string::String) { self.base = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_base(&mut self) -> &mut ::std::string::String { if self.base.is_none() { self.base = ::std::option::Option::Some(::std::string::String::new()); } self.base.as_mut().unwrap() } // Take field pub fn take_base(&mut self) -> ::std::string::String { self.base.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string auxiliary = 2; pub fn auxiliary(&self) -> &str { match self.auxiliary.as_ref() { Some(v) => v, None => "", } } pub fn clear_auxiliary(&mut self) { self.auxiliary = ::std::option::Option::None; } pub fn has_auxiliary(&self) -> bool { self.auxiliary.is_some() } // Param is passed by value, moved pub fn set_auxiliary(&mut self, v: ::std::string::String) { self.auxiliary = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_auxiliary(&mut self) -> &mut ::std::string::String { if self.auxiliary.is_none() { self.auxiliary = ::std::option::Option::Some(::std::string::String::new()); } self.auxiliary.as_mut().unwrap() } // Take field pub fn take_auxiliary(&mut self) -> ::std::string::String { self.auxiliary.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string marks = 3; pub fn marks(&self) -> &str { match self.marks.as_ref() { Some(v) => v, None => "", } } pub fn clear_marks(&mut self) { self.marks = ::std::option::Option::None; } pub fn has_marks(&self) -> bool { self.marks.is_some() } // Param is passed by value, moved pub fn set_marks(&mut self, v: ::std::string::String) { self.marks = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_marks(&mut self) -> &mut ::std::string::String { if self.marks.is_none() { self.marks = ::std::option::Option::Some(::std::string::String::new()); } self.marks.as_mut().unwrap() } // Take field pub fn take_marks(&mut self) -> ::std::string::String { self.marks.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string numerals = 4; pub fn numerals(&self) -> &str { match self.numerals.as_ref() { Some(v) => v, None => "", } } pub fn clear_numerals(&mut self) { self.numerals = ::std::option::Option::None; } pub fn has_numerals(&self) -> bool { self.numerals.is_some() } // Param is passed by value, moved pub fn set_numerals(&mut self, v: ::std::string::String) { self.numerals = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_numerals(&mut self) -> &mut ::std::string::String { if self.numerals.is_none() { self.numerals = ::std::option::Option::Some(::std::string::String::new()); } self.numerals.as_mut().unwrap() } // Take field pub fn take_numerals(&mut self) -> ::std::string::String { self.numerals.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string punctuation = 5; pub fn punctuation(&self) -> &str { match self.punctuation.as_ref() { Some(v) => v, None => "", } } pub fn clear_punctuation(&mut self) { self.punctuation = ::std::option::Option::None; } pub fn has_punctuation(&self) -> bool { self.punctuation.is_some() } // Param is passed by value, moved pub fn set_punctuation(&mut self, v: ::std::string::String) { self.punctuation = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_punctuation(&mut self) -> &mut ::std::string::String { if self.punctuation.is_none() { self.punctuation = ::std::option::Option::Some(::std::string::String::new()); } self.punctuation.as_mut().unwrap() } // Take field pub fn take_punctuation(&mut self) -> ::std::string::String { self.punctuation.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string index = 6; pub fn index(&self) -> &str { match self.index.as_ref() { Some(v) => v, None => "", } } pub fn clear_index(&mut self) { self.index = ::std::option::Option::None; } pub fn has_index(&self) -> bool { self.index.is_some() } // Param is passed by value, moved pub fn set_index(&mut self, v: ::std::string::String) { self.index = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_index(&mut self) -> &mut ::std::string::String { if self.index.is_none() { self.index = ::std::option::Option::Some(::std::string::String::new()); } self.index.as_mut().unwrap() } // Take field pub fn take_index(&mut self) -> ::std::string::String { self.index.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string not_required = 7; pub fn not_required(&self) -> &str { match self.not_required.as_ref() { Some(v) => v, None => "", } } pub fn clear_not_required(&mut self) { self.not_required = ::std::option::Option::None; } pub fn has_not_required(&self) -> bool { self.not_required.is_some() } // Param is passed by value, moved pub fn set_not_required(&mut self, v: ::std::string::String) { self.not_required = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_not_required(&mut self) -> &mut ::std::string::String { if self.not_required.is_none() { self.not_required = ::std::option::Option::Some(::std::string::String::new()); } self.not_required.as_mut().unwrap() } // Take field pub fn take_not_required(&mut self) -> ::std::string::String { self.not_required.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(7); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "base", |m: &ExemplarCharsProto| { &m.base }, |m: &mut ExemplarCharsProto| { &mut m.base }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "auxiliary", |m: &ExemplarCharsProto| { &m.auxiliary }, |m: &mut ExemplarCharsProto| { &mut m.auxiliary }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "marks", |m: &ExemplarCharsProto| { &m.marks }, |m: &mut ExemplarCharsProto| { &mut m.marks }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "numerals", |m: &ExemplarCharsProto| { &m.numerals }, |m: &mut ExemplarCharsProto| { &mut m.numerals }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "punctuation", |m: &ExemplarCharsProto| { &m.punctuation }, |m: &mut ExemplarCharsProto| { &mut m.punctuation }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "index", |m: &ExemplarCharsProto| { &m.index }, |m: &mut ExemplarCharsProto| { &mut m.index }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "not_required", |m: &ExemplarCharsProto| { &m.not_required }, |m: &mut ExemplarCharsProto| { &mut m.not_required }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "ExemplarCharsProto", fields, oneofs, ) } } impl ::protobuf::Message for ExemplarCharsProto { const NAME: &'static str = "ExemplarCharsProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.base = ::std::option::Option::Some(is.read_string()?); }, 18 => { self.auxiliary = ::std::option::Option::Some(is.read_string()?); }, 26 => { self.marks = ::std::option::Option::Some(is.read_string()?); }, 34 => { self.numerals = ::std::option::Option::Some(is.read_string()?); }, 42 => { self.punctuation = ::std::option::Option::Some(is.read_string()?); }, 50 => { self.index = ::std::option::Option::Some(is.read_string()?); }, 58 => { self.not_required = ::std::option::Option::Some(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.base.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.auxiliary.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } if let Some(v) = self.marks.as_ref() { my_size += ::protobuf::rt::string_size(3, &v); } if let Some(v) = self.numerals.as_ref() { my_size += ::protobuf::rt::string_size(4, &v); } if let Some(v) = self.punctuation.as_ref() { my_size += ::protobuf::rt::string_size(5, &v); } if let Some(v) = self.index.as_ref() { my_size += ::protobuf::rt::string_size(6, &v); } if let Some(v) = self.not_required.as_ref() { my_size += ::protobuf::rt::string_size(7, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.base.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.auxiliary.as_ref() { os.write_string(2, v)?; } if let Some(v) = self.marks.as_ref() { os.write_string(3, v)?; } if let Some(v) = self.numerals.as_ref() { os.write_string(4, v)?; } if let Some(v) = self.punctuation.as_ref() { os.write_string(5, v)?; } if let Some(v) = self.index.as_ref() { os.write_string(6, v)?; } if let Some(v) = self.not_required.as_ref() { os.write_string(7, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> ExemplarCharsProto { ExemplarCharsProto::new() } fn clear(&mut self) { self.base = ::std::option::Option::None; self.auxiliary = ::std::option::Option::None; self.marks = ::std::option::Option::None; self.numerals = ::std::option::Option::None; self.punctuation = ::std::option::Option::None; self.index = ::std::option::Option::None; self.not_required = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static ExemplarCharsProto { static instance: ExemplarCharsProto = ExemplarCharsProto { base: ::std::option::Option::None, auxiliary: ::std::option::Option::None, marks: ::std::option::Option::None, numerals: ::std::option::Option::None, punctuation: ::std::option::Option::None, index: ::std::option::Option::None, not_required: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for ExemplarCharsProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("ExemplarCharsProto").unwrap()).clone() } } impl ::std::fmt::Display for ExemplarCharsProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ExemplarCharsProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:google.languages_public.SampleTextProto) #[derive(PartialEq,Clone,Default,Debug)] pub struct SampleTextProto { // message fields // @@protoc_insertion_point(field:google.languages_public.SampleTextProto.masthead_full) pub masthead_full: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.SampleTextProto.masthead_partial) pub masthead_partial: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.SampleTextProto.styles) pub styles: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.SampleTextProto.tester) pub tester: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.SampleTextProto.poster_sm) pub poster_sm: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.SampleTextProto.poster_md) pub poster_md: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.SampleTextProto.poster_lg) pub poster_lg: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.SampleTextProto.specimen_48) pub specimen_48: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.SampleTextProto.specimen_36) pub specimen_36: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.SampleTextProto.specimen_32) pub specimen_32: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.SampleTextProto.specimen_21) pub specimen_21: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.SampleTextProto.specimen_16) pub specimen_16: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:google.languages_public.SampleTextProto.note) pub note: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:google.languages_public.SampleTextProto.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a SampleTextProto { fn default() -> &'a SampleTextProto { ::default_instance() } } impl SampleTextProto { pub fn new() -> SampleTextProto { ::std::default::Default::default() } // optional string masthead_full = 1; pub fn masthead_full(&self) -> &str { match self.masthead_full.as_ref() { Some(v) => v, None => "", } } pub fn clear_masthead_full(&mut self) { self.masthead_full = ::std::option::Option::None; } pub fn has_masthead_full(&self) -> bool { self.masthead_full.is_some() } // Param is passed by value, moved pub fn set_masthead_full(&mut self, v: ::std::string::String) { self.masthead_full = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_masthead_full(&mut self) -> &mut ::std::string::String { if self.masthead_full.is_none() { self.masthead_full = ::std::option::Option::Some(::std::string::String::new()); } self.masthead_full.as_mut().unwrap() } // Take field pub fn take_masthead_full(&mut self) -> ::std::string::String { self.masthead_full.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string masthead_partial = 2; pub fn masthead_partial(&self) -> &str { match self.masthead_partial.as_ref() { Some(v) => v, None => "", } } pub fn clear_masthead_partial(&mut self) { self.masthead_partial = ::std::option::Option::None; } pub fn has_masthead_partial(&self) -> bool { self.masthead_partial.is_some() } // Param is passed by value, moved pub fn set_masthead_partial(&mut self, v: ::std::string::String) { self.masthead_partial = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_masthead_partial(&mut self) -> &mut ::std::string::String { if self.masthead_partial.is_none() { self.masthead_partial = ::std::option::Option::Some(::std::string::String::new()); } self.masthead_partial.as_mut().unwrap() } // Take field pub fn take_masthead_partial(&mut self) -> ::std::string::String { self.masthead_partial.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string styles = 3; pub fn styles(&self) -> &str { match self.styles.as_ref() { Some(v) => v, None => "", } } pub fn clear_styles(&mut self) { self.styles = ::std::option::Option::None; } pub fn has_styles(&self) -> bool { self.styles.is_some() } // Param is passed by value, moved pub fn set_styles(&mut self, v: ::std::string::String) { self.styles = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_styles(&mut self) -> &mut ::std::string::String { if self.styles.is_none() { self.styles = ::std::option::Option::Some(::std::string::String::new()); } self.styles.as_mut().unwrap() } // Take field pub fn take_styles(&mut self) -> ::std::string::String { self.styles.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string tester = 4; pub fn tester(&self) -> &str { match self.tester.as_ref() { Some(v) => v, None => "", } } pub fn clear_tester(&mut self) { self.tester = ::std::option::Option::None; } pub fn has_tester(&self) -> bool { self.tester.is_some() } // Param is passed by value, moved pub fn set_tester(&mut self, v: ::std::string::String) { self.tester = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_tester(&mut self) -> &mut ::std::string::String { if self.tester.is_none() { self.tester = ::std::option::Option::Some(::std::string::String::new()); } self.tester.as_mut().unwrap() } // Take field pub fn take_tester(&mut self) -> ::std::string::String { self.tester.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string poster_sm = 5; pub fn poster_sm(&self) -> &str { match self.poster_sm.as_ref() { Some(v) => v, None => "", } } pub fn clear_poster_sm(&mut self) { self.poster_sm = ::std::option::Option::None; } pub fn has_poster_sm(&self) -> bool { self.poster_sm.is_some() } // Param is passed by value, moved pub fn set_poster_sm(&mut self, v: ::std::string::String) { self.poster_sm = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_poster_sm(&mut self) -> &mut ::std::string::String { if self.poster_sm.is_none() { self.poster_sm = ::std::option::Option::Some(::std::string::String::new()); } self.poster_sm.as_mut().unwrap() } // Take field pub fn take_poster_sm(&mut self) -> ::std::string::String { self.poster_sm.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string poster_md = 6; pub fn poster_md(&self) -> &str { match self.poster_md.as_ref() { Some(v) => v, None => "", } } pub fn clear_poster_md(&mut self) { self.poster_md = ::std::option::Option::None; } pub fn has_poster_md(&self) -> bool { self.poster_md.is_some() } // Param is passed by value, moved pub fn set_poster_md(&mut self, v: ::std::string::String) { self.poster_md = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_poster_md(&mut self) -> &mut ::std::string::String { if self.poster_md.is_none() { self.poster_md = ::std::option::Option::Some(::std::string::String::new()); } self.poster_md.as_mut().unwrap() } // Take field pub fn take_poster_md(&mut self) -> ::std::string::String { self.poster_md.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string poster_lg = 7; pub fn poster_lg(&self) -> &str { match self.poster_lg.as_ref() { Some(v) => v, None => "", } } pub fn clear_poster_lg(&mut self) { self.poster_lg = ::std::option::Option::None; } pub fn has_poster_lg(&self) -> bool { self.poster_lg.is_some() } // Param is passed by value, moved pub fn set_poster_lg(&mut self, v: ::std::string::String) { self.poster_lg = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_poster_lg(&mut self) -> &mut ::std::string::String { if self.poster_lg.is_none() { self.poster_lg = ::std::option::Option::Some(::std::string::String::new()); } self.poster_lg.as_mut().unwrap() } // Take field pub fn take_poster_lg(&mut self) -> ::std::string::String { self.poster_lg.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string specimen_48 = 8; pub fn specimen_48(&self) -> &str { match self.specimen_48.as_ref() { Some(v) => v, None => "", } } pub fn clear_specimen_48(&mut self) { self.specimen_48 = ::std::option::Option::None; } pub fn has_specimen_48(&self) -> bool { self.specimen_48.is_some() } // Param is passed by value, moved pub fn set_specimen_48(&mut self, v: ::std::string::String) { self.specimen_48 = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_specimen_48(&mut self) -> &mut ::std::string::String { if self.specimen_48.is_none() { self.specimen_48 = ::std::option::Option::Some(::std::string::String::new()); } self.specimen_48.as_mut().unwrap() } // Take field pub fn take_specimen_48(&mut self) -> ::std::string::String { self.specimen_48.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string specimen_36 = 9; pub fn specimen_36(&self) -> &str { match self.specimen_36.as_ref() { Some(v) => v, None => "", } } pub fn clear_specimen_36(&mut self) { self.specimen_36 = ::std::option::Option::None; } pub fn has_specimen_36(&self) -> bool { self.specimen_36.is_some() } // Param is passed by value, moved pub fn set_specimen_36(&mut self, v: ::std::string::String) { self.specimen_36 = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_specimen_36(&mut self) -> &mut ::std::string::String { if self.specimen_36.is_none() { self.specimen_36 = ::std::option::Option::Some(::std::string::String::new()); } self.specimen_36.as_mut().unwrap() } // Take field pub fn take_specimen_36(&mut self) -> ::std::string::String { self.specimen_36.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string specimen_32 = 10; pub fn specimen_32(&self) -> &str { match self.specimen_32.as_ref() { Some(v) => v, None => "", } } pub fn clear_specimen_32(&mut self) { self.specimen_32 = ::std::option::Option::None; } pub fn has_specimen_32(&self) -> bool { self.specimen_32.is_some() } // Param is passed by value, moved pub fn set_specimen_32(&mut self, v: ::std::string::String) { self.specimen_32 = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_specimen_32(&mut self) -> &mut ::std::string::String { if self.specimen_32.is_none() { self.specimen_32 = ::std::option::Option::Some(::std::string::String::new()); } self.specimen_32.as_mut().unwrap() } // Take field pub fn take_specimen_32(&mut self) -> ::std::string::String { self.specimen_32.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string specimen_21 = 11; pub fn specimen_21(&self) -> &str { match self.specimen_21.as_ref() { Some(v) => v, None => "", } } pub fn clear_specimen_21(&mut self) { self.specimen_21 = ::std::option::Option::None; } pub fn has_specimen_21(&self) -> bool { self.specimen_21.is_some() } // Param is passed by value, moved pub fn set_specimen_21(&mut self, v: ::std::string::String) { self.specimen_21 = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_specimen_21(&mut self) -> &mut ::std::string::String { if self.specimen_21.is_none() { self.specimen_21 = ::std::option::Option::Some(::std::string::String::new()); } self.specimen_21.as_mut().unwrap() } // Take field pub fn take_specimen_21(&mut self) -> ::std::string::String { self.specimen_21.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string specimen_16 = 12; pub fn specimen_16(&self) -> &str { match self.specimen_16.as_ref() { Some(v) => v, None => "", } } pub fn clear_specimen_16(&mut self) { self.specimen_16 = ::std::option::Option::None; } pub fn has_specimen_16(&self) -> bool { self.specimen_16.is_some() } // Param is passed by value, moved pub fn set_specimen_16(&mut self, v: ::std::string::String) { self.specimen_16 = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_specimen_16(&mut self) -> &mut ::std::string::String { if self.specimen_16.is_none() { self.specimen_16 = ::std::option::Option::Some(::std::string::String::new()); } self.specimen_16.as_mut().unwrap() } // Take field pub fn take_specimen_16(&mut self) -> ::std::string::String { self.specimen_16.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string note = 13; pub fn note(&self) -> &str { match self.note.as_ref() { Some(v) => v, None => "", } } pub fn clear_note(&mut self) { self.note = ::std::option::Option::None; } pub fn has_note(&self) -> bool { self.note.is_some() } // Param is passed by value, moved pub fn set_note(&mut self, v: ::std::string::String) { self.note = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_note(&mut self) -> &mut ::std::string::String { if self.note.is_none() { self.note = ::std::option::Option::Some(::std::string::String::new()); } self.note.as_mut().unwrap() } // Take field pub fn take_note(&mut self) -> ::std::string::String { self.note.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(13); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "masthead_full", |m: &SampleTextProto| { &m.masthead_full }, |m: &mut SampleTextProto| { &mut m.masthead_full }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "masthead_partial", |m: &SampleTextProto| { &m.masthead_partial }, |m: &mut SampleTextProto| { &mut m.masthead_partial }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "styles", |m: &SampleTextProto| { &m.styles }, |m: &mut SampleTextProto| { &mut m.styles }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "tester", |m: &SampleTextProto| { &m.tester }, |m: &mut SampleTextProto| { &mut m.tester }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "poster_sm", |m: &SampleTextProto| { &m.poster_sm }, |m: &mut SampleTextProto| { &mut m.poster_sm }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "poster_md", |m: &SampleTextProto| { &m.poster_md }, |m: &mut SampleTextProto| { &mut m.poster_md }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "poster_lg", |m: &SampleTextProto| { &m.poster_lg }, |m: &mut SampleTextProto| { &mut m.poster_lg }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "specimen_48", |m: &SampleTextProto| { &m.specimen_48 }, |m: &mut SampleTextProto| { &mut m.specimen_48 }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "specimen_36", |m: &SampleTextProto| { &m.specimen_36 }, |m: &mut SampleTextProto| { &mut m.specimen_36 }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "specimen_32", |m: &SampleTextProto| { &m.specimen_32 }, |m: &mut SampleTextProto| { &mut m.specimen_32 }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "specimen_21", |m: &SampleTextProto| { &m.specimen_21 }, |m: &mut SampleTextProto| { &mut m.specimen_21 }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "specimen_16", |m: &SampleTextProto| { &m.specimen_16 }, |m: &mut SampleTextProto| { &mut m.specimen_16 }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "note", |m: &SampleTextProto| { &m.note }, |m: &mut SampleTextProto| { &mut m.note }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "SampleTextProto", fields, oneofs, ) } } impl ::protobuf::Message for SampleTextProto { const NAME: &'static str = "SampleTextProto"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.masthead_full = ::std::option::Option::Some(is.read_string()?); }, 18 => { self.masthead_partial = ::std::option::Option::Some(is.read_string()?); }, 26 => { self.styles = ::std::option::Option::Some(is.read_string()?); }, 34 => { self.tester = ::std::option::Option::Some(is.read_string()?); }, 42 => { self.poster_sm = ::std::option::Option::Some(is.read_string()?); }, 50 => { self.poster_md = ::std::option::Option::Some(is.read_string()?); }, 58 => { self.poster_lg = ::std::option::Option::Some(is.read_string()?); }, 66 => { self.specimen_48 = ::std::option::Option::Some(is.read_string()?); }, 74 => { self.specimen_36 = ::std::option::Option::Some(is.read_string()?); }, 82 => { self.specimen_32 = ::std::option::Option::Some(is.read_string()?); }, 90 => { self.specimen_21 = ::std::option::Option::Some(is.read_string()?); }, 98 => { self.specimen_16 = ::std::option::Option::Some(is.read_string()?); }, 106 => { self.note = ::std::option::Option::Some(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.masthead_full.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.masthead_partial.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } if let Some(v) = self.styles.as_ref() { my_size += ::protobuf::rt::string_size(3, &v); } if let Some(v) = self.tester.as_ref() { my_size += ::protobuf::rt::string_size(4, &v); } if let Some(v) = self.poster_sm.as_ref() { my_size += ::protobuf::rt::string_size(5, &v); } if let Some(v) = self.poster_md.as_ref() { my_size += ::protobuf::rt::string_size(6, &v); } if let Some(v) = self.poster_lg.as_ref() { my_size += ::protobuf::rt::string_size(7, &v); } if let Some(v) = self.specimen_48.as_ref() { my_size += ::protobuf::rt::string_size(8, &v); } if let Some(v) = self.specimen_36.as_ref() { my_size += ::protobuf::rt::string_size(9, &v); } if let Some(v) = self.specimen_32.as_ref() { my_size += ::protobuf::rt::string_size(10, &v); } if let Some(v) = self.specimen_21.as_ref() { my_size += ::protobuf::rt::string_size(11, &v); } if let Some(v) = self.specimen_16.as_ref() { my_size += ::protobuf::rt::string_size(12, &v); } if let Some(v) = self.note.as_ref() { my_size += ::protobuf::rt::string_size(13, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.masthead_full.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.masthead_partial.as_ref() { os.write_string(2, v)?; } if let Some(v) = self.styles.as_ref() { os.write_string(3, v)?; } if let Some(v) = self.tester.as_ref() { os.write_string(4, v)?; } if let Some(v) = self.poster_sm.as_ref() { os.write_string(5, v)?; } if let Some(v) = self.poster_md.as_ref() { os.write_string(6, v)?; } if let Some(v) = self.poster_lg.as_ref() { os.write_string(7, v)?; } if let Some(v) = self.specimen_48.as_ref() { os.write_string(8, v)?; } if let Some(v) = self.specimen_36.as_ref() { os.write_string(9, v)?; } if let Some(v) = self.specimen_32.as_ref() { os.write_string(10, v)?; } if let Some(v) = self.specimen_21.as_ref() { os.write_string(11, v)?; } if let Some(v) = self.specimen_16.as_ref() { os.write_string(12, v)?; } if let Some(v) = self.note.as_ref() { os.write_string(13, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> SampleTextProto { SampleTextProto::new() } fn clear(&mut self) { self.masthead_full = ::std::option::Option::None; self.masthead_partial = ::std::option::Option::None; self.styles = ::std::option::Option::None; self.tester = ::std::option::Option::None; self.poster_sm = ::std::option::Option::None; self.poster_md = ::std::option::Option::None; self.poster_lg = ::std::option::Option::None; self.specimen_48 = ::std::option::Option::None; self.specimen_36 = ::std::option::Option::None; self.specimen_32 = ::std::option::Option::None; self.specimen_21 = ::std::option::Option::None; self.specimen_16 = ::std::option::Option::None; self.note = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static SampleTextProto { static instance: SampleTextProto = SampleTextProto { masthead_full: ::std::option::Option::None, masthead_partial: ::std::option::Option::None, styles: ::std::option::Option::None, tester: ::std::option::Option::None, poster_sm: ::std::option::Option::None, poster_md: ::std::option::Option::None, poster_lg: ::std::option::Option::None, specimen_48: ::std::option::Option::None, specimen_36: ::std::option::Option::None, specimen_32: ::std::option::Option::None, specimen_21: ::std::option::Option::None, specimen_16: ::std::option::Option::None, note: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for SampleTextProto { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("SampleTextProto").unwrap()).clone() } } impl ::std::fmt::Display for SampleTextProto { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for SampleTextProto { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ \n\x16languages_public.proto\x12\x17google.languages_public\"t\n\x0bRegi\ onProto\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x12\n\x04name\x18\ \x02\x20\x01(\tR\x04name\x12\x1e\n\npopulation\x18\x03\x20\x01(\x05R\npo\ pulation\x12!\n\x0cregion_group\x18\x04\x20\x03(\tR\x0bregionGroup\"\xa1\ \x01\n\x0bScriptProto\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x12\ \n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x1e\n\nhistorical\x18\x03\x20\ \x01(\x08R\nhistorical\x12\x1c\n\tfictional\x18\x04\x20\x01(\x08R\tficti\ onal\x12\x16\n\x06family\x18\x05\x20\x01(\tR\x06family\x12\x18\n\x07summ\ ary\x18\x06\x20\x01(\tR\x07summary\"\xcb\x03\n\rLanguageProto\x12\x0e\n\ \x02id\x18\x01\x20\x01(\tR\x02id\x12\x1a\n\x08language\x18\x02\x20\x01(\ \tR\x08language\x12\x16\n\x06script\x18\x03\x20\x01(\tR\x06script\x12\ \x12\n\x04name\x18\x04\x20\x01(\tR\x04name\x12%\n\x0epreferred_name\x18\ \x05\x20\x01(\tR\rpreferredName\x12\x18\n\x07autonym\x18\x06\x20\x01(\tR\ \x07autonym\x12\x1e\n\npopulation\x18\x07\x20\x01(\x05R\npopulation\x12\ \x16\n\x06region\x18\x08\x20\x03(\tR\x06region\x12R\n\x0eexemplar_chars\ \x18\t\x20\x01(\x0b2+.google.languages_public.ExemplarCharsProtoR\rexemp\ larChars\x12I\n\x0bsample_text\x18\n\x20\x01(\x0b2(.google.languages_pub\ lic.SampleTextProtoR\nsampleText\x12\x1e\n\nhistorical\x18\x0b\x20\x01(\ \x08R\nhistorical\x12\x16\n\x06source\x18\x0c\x20\x03(\tR\x06source\x12\ \x12\n\x04note\x18\r\x20\x01(\tR\x04note\"\xd3\x01\n\x12ExemplarCharsPro\ to\x12\x12\n\x04base\x18\x01\x20\x01(\tR\x04base\x12\x1c\n\tauxiliary\ \x18\x02\x20\x01(\tR\tauxiliary\x12\x14\n\x05marks\x18\x03\x20\x01(\tR\ \x05marks\x12\x1a\n\x08numerals\x18\x04\x20\x01(\tR\x08numerals\x12\x20\ \n\x0bpunctuation\x18\x05\x20\x01(\tR\x0bpunctuation\x12\x14\n\x05index\ \x18\x06\x20\x01(\tR\x05index\x12!\n\x0cnot_required\x18\x07\x20\x01(\tR\ \x0bnotRequired\"\xa1\x03\n\x0fSampleTextProto\x12#\n\rmasthead_full\x18\ \x01\x20\x01(\tR\x0cmastheadFull\x12)\n\x10masthead_partial\x18\x02\x20\ \x01(\tR\x0fmastheadPartial\x12\x16\n\x06styles\x18\x03\x20\x01(\tR\x06s\ tyles\x12\x16\n\x06tester\x18\x04\x20\x01(\tR\x06tester\x12\x1b\n\tposte\ r_sm\x18\x05\x20\x01(\tR\x08posterSm\x12\x1b\n\tposter_md\x18\x06\x20\ \x01(\tR\x08posterMd\x12\x1b\n\tposter_lg\x18\x07\x20\x01(\tR\x08posterL\ g\x12\x1f\n\x0bspecimen_48\x18\x08\x20\x01(\tR\nspecimen48\x12\x1f\n\x0b\ specimen_36\x18\t\x20\x01(\tR\nspecimen36\x12\x1f\n\x0bspecimen_32\x18\n\ \x20\x01(\tR\nspecimen32\x12\x1f\n\x0bspecimen_21\x18\x0b\x20\x01(\tR\ns\ pecimen21\x12\x1f\n\x0bspecimen_16\x18\x0c\x20\x01(\tR\nspecimen16\x12\ \x12\n\x04note\x18\r\x20\x01(\tR\x04noteJ\xcc\x1b\n\x06\x12\x04\0\0H\x01\ \n\x08\n\x01\x0c\x12\x03\0\0\x12\n6\n\x01\x02\x12\x03\x05\0\x20\x1a,*\n\ \x20languages/regions/scripts\x20proto\x20formats.\n\n:\n\x02\x04\0\x12\ \x04\x08\0\x0f\x01\x1a.\x20A\x20region\x20or\x20territory\x20as\x20defin\ ed\x20in\x20the\x20CLDR\n\n\n\n\x03\x04\0\x01\x12\x03\x08\x08\x13\n+\n\ \x04\x04\0\x02\0\x12\x03\t\x02\x19\"\x1e\x20Region\x20codes\x20defined\ \x20by\x20CLDR\n\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03\t\x02\n\n\x0c\n\x05\ \x04\0\x02\0\x05\x12\x03\t\x0b\x11\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\t\ \x12\x14\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\t\x17\x18\n\x0b\n\x04\x04\0\ \x02\x01\x12\x03\n\x02\x1b\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03\n\x02\n\ \n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\n\x0b\x11\n\x0c\n\x05\x04\0\x02\ \x01\x01\x12\x03\n\x12\x16\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\n\x19\ \x1a\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x0b\x02\x20\n\x0c\n\x05\x04\0\x02\ \x02\x04\x12\x03\x0b\x02\n\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x0b\x0b\ \x10\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x0b\x11\x1b\n\x0c\n\x05\x04\0\ \x02\x02\x03\x12\x03\x0b\x1e\x1f\n\x0b\n\x04\x04\0\x02\x03\x12\x03\x0c\ \x02#\n\x0c\n\x05\x04\0\x02\x03\x04\x12\x03\x0c\x02\n\n\x0c\n\x05\x04\0\ \x02\x03\x05\x12\x03\x0c\x0b\x11\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\ \x0c\x12\x1e\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x0c!\"\n\n\n\x02\x04\ \x01\x12\x04\x11\0\x19\x01\n\n\n\x03\x04\x01\x01\x12\x03\x11\x08\x13\n+\ \n\x04\x04\x01\x02\0\x12\x03\x12\x02\x19\"\x1e\x20Script\x20codes\x20def\ ined\x20by\x20CLDR\n\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03\x12\x02\n\n\ \x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x12\x0b\x11\n\x0c\n\x05\x04\x01\x02\ \0\x01\x12\x03\x12\x12\x14\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x12\x17\ \x18\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x13\x02\x1b\n\x0c\n\x05\x04\x01\ \x02\x01\x04\x12\x03\x13\x02\n\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\ \x13\x0b\x11\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x13\x12\x16\n\x0c\n\ \x05\x04\x01\x02\x01\x03\x12\x03\x13\x19\x1a\n\x0b\n\x04\x04\x01\x02\x02\ \x12\x03\x14\x02\x1f\n\x0c\n\x05\x04\x01\x02\x02\x04\x12\x03\x14\x02\n\n\ \x0c\n\x05\x04\x01\x02\x02\x05\x12\x03\x14\x0b\x0f\n\x0c\n\x05\x04\x01\ \x02\x02\x01\x12\x03\x14\x10\x1a\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\ \x14\x1d\x1e\n\x0b\n\x04\x04\x01\x02\x03\x12\x03\x15\x02\x1e\n\x0c\n\x05\ \x04\x01\x02\x03\x04\x12\x03\x15\x02\n\n\x0c\n\x05\x04\x01\x02\x03\x05\ \x12\x03\x15\x0b\x0f\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03\x15\x10\x19\ \n\x0c\n\x05\x04\x01\x02\x03\x03\x12\x03\x15\x1c\x1d\n\x0b\n\x04\x04\x01\ \x02\x04\x12\x03\x16\x02\x1d\n\x0c\n\x05\x04\x01\x02\x04\x04\x12\x03\x16\ \x02\n\n\x0c\n\x05\x04\x01\x02\x04\x05\x12\x03\x16\x0b\x11\n\x0c\n\x05\ \x04\x01\x02\x04\x01\x12\x03\x16\x12\x18\n\x0c\n\x05\x04\x01\x02\x04\x03\ \x12\x03\x16\x1b\x1c\n\x18\n\x04\x04\x01\x02\x05\x12\x03\x17\x02\x1e\"\ \x0b\x20Next\x20=\x206;\n\n\x0c\n\x05\x04\x01\x02\x05\x04\x12\x03\x17\ \x02\n\n\x0c\n\x05\x04\x01\x02\x05\x05\x12\x03\x17\x0b\x11\n\x0c\n\x05\ \x04\x01\x02\x05\x01\x12\x03\x17\x12\x19\n\x0c\n\x05\x04\x01\x02\x05\x03\ \x12\x03\x17\x1c\x1d\n\n\n\x02\x04\x02\x12\x04\x1b\0+\x01\n\n\n\x03\x04\ \x02\x01\x12\x03\x1b\x08\x15\n2\n\x04\x04\x02\x02\0\x12\x03\x1c\x02\x19\ \"%\x20Either\x20${lang}\x20or\x20${lang}_${script}\n\n\x0c\n\x05\x04\ \x02\x02\0\x04\x12\x03\x1c\x02\n\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\ \x1c\x0b\x11\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\x1c\x12\x14\n\x0c\n\ \x05\x04\x02\x02\0\x03\x12\x03\x1c\x17\x18\n\x15\n\x04\x04\x02\x02\x01\ \x12\x03\x1d\x02\x1f\"\x08\x20BCP\x2047\n\n\x0c\n\x05\x04\x02\x02\x01\ \x04\x12\x03\x1d\x02\n\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03\x1d\x0b\ \x11\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\x1d\x12\x1a\n\x0c\n\x05\x04\ \x02\x02\x01\x03\x12\x03\x1d\x1d\x1e\n\x0b\n\x04\x04\x02\x02\x02\x12\x03\ \x1e\x02\x1d\n\x0c\n\x05\x04\x02\x02\x02\x04\x12\x03\x1e\x02\n\n\x0c\n\ \x05\x04\x02\x02\x02\x05\x12\x03\x1e\x0b\x11\n\x0c\n\x05\x04\x02\x02\x02\ \x01\x12\x03\x1e\x12\x18\n\x0c\n\x05\x04\x02\x02\x02\x03\x12\x03\x1e\x1b\ \x1c\n\x0b\n\x04\x04\x02\x02\x03\x12\x03\x1f\x02\x1b\n\x0c\n\x05\x04\x02\ \x02\x03\x04\x12\x03\x1f\x02\n\n\x0c\n\x05\x04\x02\x02\x03\x05\x12\x03\ \x1f\x0b\x11\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03\x1f\x12\x16\n\x0c\n\ \x05\x04\x02\x02\x03\x03\x12\x03\x1f\x19\x1a\n\x0b\n\x04\x04\x02\x02\x04\ \x12\x03\x20\x02%\n\x0c\n\x05\x04\x02\x02\x04\x04\x12\x03\x20\x02\n\n\ \x0c\n\x05\x04\x02\x02\x04\x05\x12\x03\x20\x0b\x11\n\x0c\n\x05\x04\x02\ \x02\x04\x01\x12\x03\x20\x12\x20\n\x0c\n\x05\x04\x02\x02\x04\x03\x12\x03\ \x20#$\n;\n\x04\x04\x02\x02\x05\x12\x03!\x02\x1e\".\x20Name\x20of\x20lan\ guage\x20as\x20written\x20in\x20that\x20language\n\n\x0c\n\x05\x04\x02\ \x02\x05\x04\x12\x03!\x02\n\n\x0c\n\x05\x04\x02\x02\x05\x05\x12\x03!\x0b\ \x11\n\x0c\n\x05\x04\x02\x02\x05\x01\x12\x03!\x12\x19\n\x0c\n\x05\x04\ \x02\x02\x05\x03\x12\x03!\x1c\x1d\n\x0b\n\x04\x04\x02\x02\x06\x12\x03\"\ \x02\x20\n\x0c\n\x05\x04\x02\x02\x06\x04\x12\x03\"\x02\n\n\x0c\n\x05\x04\ \x02\x02\x06\x05\x12\x03\"\x0b\x10\n\x0c\n\x05\x04\x02\x02\x06\x01\x12\ \x03\"\x11\x1b\n\x0c\n\x05\x04\x02\x02\x06\x03\x12\x03\"\x1e\x1f\n\x0b\n\ \x04\x04\x02\x02\x07\x12\x03#\x02\x1d\n\x0c\n\x05\x04\x02\x02\x07\x04\ \x12\x03#\x02\n\n\x0c\n\x05\x04\x02\x02\x07\x05\x12\x03#\x0b\x11\n\x0c\n\ \x05\x04\x02\x02\x07\x01\x12\x03#\x12\x18\n\x0c\n\x05\x04\x02\x02\x07\ \x03\x12\x03#\x1b\x1c\n\x0b\n\x04\x04\x02\x02\x08\x12\x03$\x021\n\x0c\n\ \x05\x04\x02\x02\x08\x04\x12\x03$\x02\n\n\x0c\n\x05\x04\x02\x02\x08\x06\ \x12\x03$\x0b\x1d\n\x0c\n\x05\x04\x02\x02\x08\x01\x12\x03$\x1e,\n\x0c\n\ \x05\x04\x02\x02\x08\x03\x12\x03$/0\n\x0b\n\x04\x04\x02\x02\t\x12\x03%\ \x02,\n\x0c\n\x05\x04\x02\x02\t\x04\x12\x03%\x02\n\n\x0c\n\x05\x04\x02\ \x02\t\x06\x12\x03%\x0b\x1a\n\x0c\n\x05\x04\x02\x02\t\x01\x12\x03%\x1b&\ \n\x0c\n\x05\x04\x02\x02\t\x03\x12\x03%)+\n\x0b\n\x04\x04\x02\x02\n\x12\ \x03&\x02\x20\n\x0c\n\x05\x04\x02\x02\n\x04\x12\x03&\x02\n\n\x0c\n\x05\ \x04\x02\x02\n\x05\x12\x03&\x0b\x0f\n\x0c\n\x05\x04\x02\x02\n\x01\x12\ \x03&\x10\x1a\n\x0c\n\x05\x04\x02\x02\n\x03\x12\x03&\x1d\x1f\n\x0b\n\x04\ \x04\x02\x02\x0b\x12\x03'\x02\x1e\n\x0c\n\x05\x04\x02\x02\x0b\x04\x12\ \x03'\x02\n\n\x0c\n\x05\x04\x02\x02\x0b\x05\x12\x03'\x0b\x11\n\x0c\n\x05\ \x04\x02\x02\x0b\x01\x12\x03'\x12\x18\n\x0c\n\x05\x04\x02\x02\x0b\x03\ \x12\x03'\x1b\x1d\n\x0b\n\x04\x04\x02\x02\x0c\x12\x03(\x02\x1c\n\x0c\n\ \x05\x04\x02\x02\x0c\x04\x12\x03(\x02\n\n\x0c\n\x05\x04\x02\x02\x0c\x05\ \x12\x03(\x0b\x11\n\x0c\n\x05\x04\x02\x02\x0c\x01\x12\x03(\x12\x16\n\x0c\ \n\x05\x04\x02\x02\x0c\x03\x12\x03(\x19\x1b\nU\n\x02\x04\x03\x12\x04.\08\ \x01\x1aI\x20Space-separated\x20lists\x20of\x20characters\x20representat\ ive\x20of\x20a\x20given\x20language.\n\n\n\n\x03\x04\x03\x01\x12\x03.\ \x08\x1a\n\x0b\n\x04\x04\x03\x02\0\x12\x03/\x02\x1b\n\x0c\n\x05\x04\x03\ \x02\0\x04\x12\x03/\x02\n\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03/\x0b\x11\ \n\x0c\n\x05\x04\x03\x02\0\x01\x12\x03/\x12\x16\n\x0c\n\x05\x04\x03\x02\ \0\x03\x12\x03/\x19\x1a\n\x0b\n\x04\x04\x03\x02\x01\x12\x030\x02\x20\n\ \x0c\n\x05\x04\x03\x02\x01\x04\x12\x030\x02\n\n\x0c\n\x05\x04\x03\x02\ \x01\x05\x12\x030\x0b\x11\n\x0c\n\x05\x04\x03\x02\x01\x01\x12\x030\x12\ \x1b\n\x0c\n\x05\x04\x03\x02\x01\x03\x12\x030\x1e\x1f\n\x0b\n\x04\x04\ \x03\x02\x02\x12\x031\x02\x1c\n\x0c\n\x05\x04\x03\x02\x02\x04\x12\x031\ \x02\n\n\x0c\n\x05\x04\x03\x02\x02\x05\x12\x031\x0b\x11\n\x0c\n\x05\x04\ \x03\x02\x02\x01\x12\x031\x12\x17\n\x0c\n\x05\x04\x03\x02\x02\x03\x12\ \x031\x1a\x1b\n\x0b\n\x04\x04\x03\x02\x03\x12\x032\x02\x1f\n\x0c\n\x05\ \x04\x03\x02\x03\x04\x12\x032\x02\n\n\x0c\n\x05\x04\x03\x02\x03\x05\x12\ \x032\x0b\x11\n\x0c\n\x05\x04\x03\x02\x03\x01\x12\x032\x12\x1a\n\x0c\n\ \x05\x04\x03\x02\x03\x03\x12\x032\x1d\x1e\n\x0b\n\x04\x04\x03\x02\x04\ \x12\x033\x02\"\n\x0c\n\x05\x04\x03\x02\x04\x04\x12\x033\x02\n\n\x0c\n\ \x05\x04\x03\x02\x04\x05\x12\x033\x0b\x11\n\x0c\n\x05\x04\x03\x02\x04\ \x01\x12\x033\x12\x1d\n\x0c\n\x05\x04\x03\x02\x04\x03\x12\x033\x20!\n\ \x0b\n\x04\x04\x03\x02\x05\x12\x034\x02\x1c\n\x0c\n\x05\x04\x03\x02\x05\ \x04\x12\x034\x02\n\n\x0c\n\x05\x04\x03\x02\x05\x05\x12\x034\x0b\x11\n\ \x0c\n\x05\x04\x03\x02\x05\x01\x12\x034\x12\x17\n\x0c\n\x05\x04\x03\x02\ \x05\x03\x12\x034\x1a\x1b\nU\n\x04\x04\x03\x02\x06\x12\x035\x02#\"H\x20B\ ase\x20characters\x20which\x20can\x20be\x20ignored\x20when\x20determinin\ g\x20language\x20support\n\n\x0c\n\x05\x04\x03\x02\x06\x04\x12\x035\x02\ \n\n\x0c\n\x05\x04\x03\x02\x06\x05\x12\x035\x0b\x11\n\x0c\n\x05\x04\x03\ \x02\x06\x01\x12\x035\x12\x1e\n\x0c\n\x05\x04\x03\x02\x06\x03\x12\x035!\ \"\n\n\n\x02\x04\x04\x12\x04:\0H\x01\n\n\n\x03\x04\x04\x01\x12\x03:\x08\ \x17\n\x0b\n\x04\x04\x04\x02\0\x12\x03;\x02$\n\x0c\n\x05\x04\x04\x02\0\ \x04\x12\x03;\x02\n\n\x0c\n\x05\x04\x04\x02\0\x05\x12\x03;\x0b\x11\n\x0c\ \n\x05\x04\x04\x02\0\x01\x12\x03;\x12\x1f\n\x0c\n\x05\x04\x04\x02\0\x03\ \x12\x03;\"#\n\x0b\n\x04\x04\x04\x02\x01\x12\x03<\x02'\n\x0c\n\x05\x04\ \x04\x02\x01\x04\x12\x03<\x02\n\n\x0c\n\x05\x04\x04\x02\x01\x05\x12\x03<\ \x0b\x11\n\x0c\n\x05\x04\x04\x02\x01\x01\x12\x03<\x12\"\n\x0c\n\x05\x04\ \x04\x02\x01\x03\x12\x03<%&\n\x0b\n\x04\x04\x04\x02\x02\x12\x03=\x02\x1d\ \n\x0c\n\x05\x04\x04\x02\x02\x04\x12\x03=\x02\n\n\x0c\n\x05\x04\x04\x02\ \x02\x05\x12\x03=\x0b\x11\n\x0c\n\x05\x04\x04\x02\x02\x01\x12\x03=\x12\ \x18\n\x0c\n\x05\x04\x04\x02\x02\x03\x12\x03=\x1b\x1c\n\x0b\n\x04\x04\ \x04\x02\x03\x12\x03>\x02\x1d\n\x0c\n\x05\x04\x04\x02\x03\x04\x12\x03>\ \x02\n\n\x0c\n\x05\x04\x04\x02\x03\x05\x12\x03>\x0b\x11\n\x0c\n\x05\x04\ \x04\x02\x03\x01\x12\x03>\x12\x18\n\x0c\n\x05\x04\x04\x02\x03\x03\x12\ \x03>\x1b\x1c\n\x0b\n\x04\x04\x04\x02\x04\x12\x03?\x02\x20\n\x0c\n\x05\ \x04\x04\x02\x04\x04\x12\x03?\x02\n\n\x0c\n\x05\x04\x04\x02\x04\x05\x12\ \x03?\x0b\x11\n\x0c\n\x05\x04\x04\x02\x04\x01\x12\x03?\x12\x1b\n\x0c\n\ \x05\x04\x04\x02\x04\x03\x12\x03?\x1e\x1f\n\x0b\n\x04\x04\x04\x02\x05\ \x12\x03@\x02\x20\n\x0c\n\x05\x04\x04\x02\x05\x04\x12\x03@\x02\n\n\x0c\n\ \x05\x04\x04\x02\x05\x05\x12\x03@\x0b\x11\n\x0c\n\x05\x04\x04\x02\x05\ \x01\x12\x03@\x12\x1b\n\x0c\n\x05\x04\x04\x02\x05\x03\x12\x03@\x1e\x1f\n\ \x0b\n\x04\x04\x04\x02\x06\x12\x03A\x02\x20\n\x0c\n\x05\x04\x04\x02\x06\ \x04\x12\x03A\x02\n\n\x0c\n\x05\x04\x04\x02\x06\x05\x12\x03A\x0b\x11\n\ \x0c\n\x05\x04\x04\x02\x06\x01\x12\x03A\x12\x1b\n\x0c\n\x05\x04\x04\x02\ \x06\x03\x12\x03A\x1e\x1f\n\x0b\n\x04\x04\x04\x02\x07\x12\x03B\x02\"\n\ \x0c\n\x05\x04\x04\x02\x07\x04\x12\x03B\x02\n\n\x0c\n\x05\x04\x04\x02\ \x07\x05\x12\x03B\x0b\x11\n\x0c\n\x05\x04\x04\x02\x07\x01\x12\x03B\x12\ \x1d\n\x0c\n\x05\x04\x04\x02\x07\x03\x12\x03B\x20!\n\x0b\n\x04\x04\x04\ \x02\x08\x12\x03C\x02\"\n\x0c\n\x05\x04\x04\x02\x08\x04\x12\x03C\x02\n\n\ \x0c\n\x05\x04\x04\x02\x08\x05\x12\x03C\x0b\x11\n\x0c\n\x05\x04\x04\x02\ \x08\x01\x12\x03C\x12\x1d\n\x0c\n\x05\x04\x04\x02\x08\x03\x12\x03C\x20!\ \n\x0b\n\x04\x04\x04\x02\t\x12\x03D\x02#\n\x0c\n\x05\x04\x04\x02\t\x04\ \x12\x03D\x02\n\n\x0c\n\x05\x04\x04\x02\t\x05\x12\x03D\x0b\x11\n\x0c\n\ \x05\x04\x04\x02\t\x01\x12\x03D\x12\x1d\n\x0c\n\x05\x04\x04\x02\t\x03\ \x12\x03D\x20\"\n\x0b\n\x04\x04\x04\x02\n\x12\x03E\x02#\n\x0c\n\x05\x04\ \x04\x02\n\x04\x12\x03E\x02\n\n\x0c\n\x05\x04\x04\x02\n\x05\x12\x03E\x0b\ \x11\n\x0c\n\x05\x04\x04\x02\n\x01\x12\x03E\x12\x1d\n\x0c\n\x05\x04\x04\ \x02\n\x03\x12\x03E\x20\"\n\x0b\n\x04\x04\x04\x02\x0b\x12\x03F\x02#\n\ \x0c\n\x05\x04\x04\x02\x0b\x04\x12\x03F\x02\n\n\x0c\n\x05\x04\x04\x02\ \x0b\x05\x12\x03F\x0b\x11\n\x0c\n\x05\x04\x04\x02\x0b\x01\x12\x03F\x12\ \x1d\n\x0c\n\x05\x04\x04\x02\x0b\x03\x12\x03F\x20\"\n\x0b\n\x04\x04\x04\ \x02\x0c\x12\x03G\x02\x1c\n\x0c\n\x05\x04\x04\x02\x0c\x04\x12\x03G\x02\n\ \n\x0c\n\x05\x04\x04\x02\x0c\x05\x12\x03G\x0b\x11\n\x0c\n\x05\x04\x04\ \x02\x0c\x01\x12\x03G\x12\x16\n\x0c\n\x05\x04\x04\x02\x0c\x03\x12\x03G\ \x19\x1b\ "; /// `FileDescriptorProto` object which was a source for this generated file fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); file_descriptor_proto_lazy.get(|| { ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() }) } /// `FileDescriptor` object which allows dynamic access to files pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); file_descriptor.get(|| { let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { let mut deps = ::std::vec::Vec::with_capacity(0); let mut messages = ::std::vec::Vec::with_capacity(5); messages.push(RegionProto::generated_message_descriptor_data()); messages.push(ScriptProto::generated_message_descriptor_data()); messages.push(LanguageProto::generated_message_descriptor_data()); messages.push(ExemplarCharsProto::generated_message_descriptor_data()); messages.push(SampleTextProto::generated_message_descriptor_data()); let mut enums = ::std::vec::Vec::with_capacity(0); ::protobuf::reflect::GeneratedFileDescriptor::new_generated( file_descriptor_proto(), deps, messages, enums, ) }); ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } googlefonts-gf-metadata-5fa0932/src/lib.rs000066400000000000000000000461631521447034200204620ustar00rootroot00000000000000mod axes; mod designers; mod fonts_public; pub mod knowledge; // Don't think anyone uses this yet, but just in case // We don't use languages_public because we want to re-export from google_fonts_languages use std::{ cell::OnceCell, collections::HashMap, fs::{self, File}, io::{BufRead, BufReader, Error, ErrorKind}, path::{Path, PathBuf}, str::FromStr, }; pub use axes::{AxisProto, FallbackProto}; pub use designers::{AvatarProto, DesignerInfoProto}; pub use fonts_public::*; use google_fonts_languages::LANGUAGES; pub use google_fonts_languages::{ ExemplarCharsProto, LanguageProto, RegionProto, SampleTextProto, ScriptProto, }; use protobuf::text_format::ParseError; use regex::Regex; use walkdir::WalkDir; /// Read a FamilyProto from a METADATA.pb file content. /// /// This function handles undocumented fields by stripping them out before parsing. pub fn read_family(s: &str) -> Result { if s.contains("position") { let re = Regex::new(r"(?m)position\s+\{[^}]*\}").expect("Valid re"); let s = re.replace_all(s, ""); protobuf::text_format::parse_from_str(&s) } else { protobuf::text_format::parse_from_str(s) } } // Export parse_from_str for all messages, so user doesn't need a // dependency on protobuf crate. impl AxisProto { /// Parse an AxisProto from its text format representation. pub fn parse_from_str(s: &str) -> Result { protobuf::text_format::parse_from_str(s) } } impl DesignerInfoProto { /// Parse a DesignerInfoProto from its text format representation. pub fn parse_from_str(s: &str) -> Result { protobuf::text_format::parse_from_str(s) } } fn exemplar_score(font: &FontProto, preferred_style: FontStyle, preferred_weight: i32) -> i32 { let mut score = 0; // prefer preferred_style if font.style() == preferred_style.style() { score += 16; } // prefer closer to preferred_weight score -= (font.weight() - preferred_weight).abs() / 100; // prefer more weight to less weight if font.weight() > preferred_weight { score += 1; } // prefer variable if font.filename().contains("].") { score += 2; } score } /// Pick the exemplar font from a family. /// /// This is the font file that is most likely to be a representative choice for /// the family. The heuristic is to prefer normal style, weight as close to 400 /// as possible, and a variable font if present. pub fn exemplar(family: &FamilyProto) -> Option<&FontProto> { fn score(font: &FontProto) -> i32 { exemplar_score(font, FontStyle::Normal, 400) } family .fonts .iter() .reduce(|acc, e| if score(acc) >= score(e) { acc } else { e }) } /// Font style preference for font selection (normal or italic) #[derive(Copy, Clone, Debug, PartialEq)] pub enum FontStyle { Normal, Italic, } impl FontStyle { fn style(&self) -> &str { match self { FontStyle::Normal => "normal", FontStyle::Italic => "italic", } } } /// Select the best matching font from a family given style and weight preferences. pub fn select_font( family: &FamilyProto, preferred_style: FontStyle, preferred_weight: i32, ) -> Option<&FontProto> { let score = |font: &FontProto| -> i32 { exemplar_score(font, preferred_style, preferred_weight) }; family .fonts .iter() .reduce(|acc, e| if score(acc) >= score(e) { acc } else { e }) } fn iter_families( root: &Path, filter: Option<&Regex>, ) -> impl Iterator)> { WalkDir::new(root) .into_iter() .filter_map(|d| d.ok()) .filter(|d| d.file_name() == "METADATA.pb") .filter(move |d| { filter .map(|r| r.find(&d.path().to_string_lossy()).is_some()) .unwrap_or(true) }) .map(|d| { ( d.path().to_path_buf(), read_family(&fs::read_to_string(d.path()).expect("To read files!")), ) }) } /// Iterate over all known languages. pub fn iter_languages(_root: &Path) -> impl Iterator> { LANGUAGES.values().map(|l| Ok(*l.clone())) } /// Read tag entries from the tags/all directory. pub fn read_tags(root: &Path) -> Result, Error> { let mut tag_dir = root.to_path_buf(); tag_dir.push("tags/all"); let mut tags = Vec::new(); for entry in fs::read_dir(&tag_dir).expect("To read tag dir") { let entry = entry.expect("To access tag dir entries"); if entry .path() .extension() .expect("To have extensions") .to_str() .expect("utf-8") != "csv" { continue; } let fd = File::open(entry.path())?; let rdr = BufReader::new(fd); tags.extend( rdr.lines() .map(|s| s.expect("Valid tag lines")) .map(|s| Tagging::from_str(&s).expect("Valid tag lines")), ); } Ok(tags) } /// Read tag metadata from tags/tags_metadata.csv pub fn read_tag_metadata(root: &Path) -> Result, Error> { let mut tag_metadata_file = root.to_path_buf(); tag_metadata_file.push("tags/tags_metadata.csv"); let mut metadata = Vec::new(); let fd = File::open(&tag_metadata_file)?; let rdr = BufReader::new(fd); metadata.extend( rdr.lines() .map(|s| s.expect("Valid tag lines")) .map(|s| TagMetadata::from_str(&s).expect("Valid tag metadata lines")), ); Ok(metadata) } fn csv_values(s: &str) -> Vec<&str> { let mut s = s; let mut values = Vec::new(); while !s.is_empty() { s = s.trim(); let mut end_idx = None; if let Some(s) = s.strip_prefix('"') { end_idx = Some(s.find('"').expect("Close quote")); } end_idx = s[end_idx.unwrap_or_default()..] .find(',') .map(|v| v + end_idx.unwrap_or_default()); if let Some(end_idx) = end_idx { let (value, rest) = s.split_at(end_idx); values.push(value.trim()); s = &rest[1..]; } else { values.push(s); s = ""; } } values } /// A tag entry for a family /// /// A tagging is an association of a family (and optionally a specific /// designspace location within that family) with a tag and a numeric value for that tag. #[derive(Clone, Debug)] pub struct Tagging { /// Font family name pub family: String, /// Optional designspace location within the family /// /// This is given in the form used in the fonts web API; for example, `ital,wght@1,700` /// refers to the italic style at weight 700. pub loc: String, /// Tag name pub tag: String, /// Tag value pub value: f32, } impl FromStr for Tagging { type Err = Error; fn from_str(s: &str) -> Result { let values = csv_values(s); let (family, loc, tag, value) = match values[..] { [family, tag, value] => (family, "", tag, value), [family, loc, tag, value] => (family, loc, tag, value), _ => return Err(Error::new(ErrorKind::InvalidData, "Unparseable tag")), }; Ok(Tagging { family: family.to_string(), loc: loc.to_string(), tag: tag.to_string(), value: f32::from_str(value) .map_err(|_| Error::new(ErrorKind::InvalidData, "Invalid tag value"))?, }) } } /// Metadata for a tag #[derive(Clone, Debug)] pub struct TagMetadata { /// Tag name (e.g. "/Quality/Drawing") pub tag: String, /// Minimum tag value pub min_value: f32, /// Maximum tag value pub max_value: f32, /// User friendly name for the tag (e.g. "drawing quality") pub prompt_name: String, } impl FromStr for TagMetadata { type Err = Error; fn from_str(s: &str) -> Result { let values = csv_values(s); let [tag, min, max, prompt_name] = values[..] else { return Err(Error::new( ErrorKind::InvalidData, "Unparseable tag metadata, wrong number of values", )); }; Ok(TagMetadata { tag: tag.into(), min_value: f32::from_str(min) .map_err(|_| Error::new(ErrorKind::InvalidData, "Invalid min value"))?, max_value: f32::from_str(max) .map_err(|_| Error::new(ErrorKind::InvalidData, "Invalid min value"))?, prompt_name: prompt_name.into(), }) } } /// A view into the Google Fonts library. /// /// This struct holds a path to a local checkout of the Google Fonts repo and /// provides cached, read-only accessors for families, tags and language /// metadata. All accessors return borrowed references where possible so callers /// should hold the `GoogleFonts` value for as long as they need the returned /// references. pub struct GoogleFonts { repo_dir: PathBuf, family_filter: Option, families: OnceCell)>>, family_by_font_file: OnceCell>, tags: OnceCell, Error>>, tag_metadata: OnceCell, Error>>, } impl GoogleFonts { /// Create a new `GoogleFonts` view. /// /// `p` should be the path to the root of a local Google Fonts repository /// checkout (the directory containing `METADATA.pb` files and the /// `tags/` directory). `family_filter`, if present, is a regular /// expression used to filter which families are exposed by the /// `families()` iterator. /// /// This constructor does not perform I/O; metadata is read lazily when /// the corresponding accessor is called. pub fn new(p: PathBuf, family_filter: Option) -> Self { Self { repo_dir: p, family_filter, families: OnceCell::new(), family_by_font_file: OnceCell::new(), tags: OnceCell::new(), tag_metadata: OnceCell::new(), } } /// Return the parsed tag entries for the repository. /// /// On first call this will read and parse the CSV files from the repo's /// `tags/all` directory. Returns `Ok(&[Tag])` when parsing succeeded, or /// `Err(&Error)` if an I/O or parse error occurred. The returned slice is /// borrowed from internal storage and remains valid for the lifetime of /// `self`. pub fn tags(&self) -> Result<&[Tagging], &Error> { self.tags .get_or_init(|| read_tags(&self.repo_dir)) .as_ref() .map(|tags| tags.as_slice()) } /// Return tag metadata (min/max and prompt names) for tags defined in /// the repository. /// /// This reads `tags/tags_metadata.csv` on first access and returns a /// borrowed slice on success. Errors are returned as `Err(&Error)`. pub fn tag_metadata(&self) -> Result<&[TagMetadata], &Error> { self.tag_metadata .get_or_init(|| read_tag_metadata(&self.repo_dir)) .as_ref() .map(|metadata| metadata.as_slice()) } /// Return a list of discovered families and their parsed metadata. /// /// Each entry is a tuple `(PathBuf, Result)`. /// The `PathBuf` is the path to the `METADATA.pb` file for the family. /// The `Result` contains the parsed `FamilyProto` on success or a /// `ParseError` if the metadata could not be parsed. Families are /// discovered lazily by scanning the repository and applying the /// `family_filter` provided at construction (if any). /// /// The returned slice is borrowed from internal storage and stays valid /// for the lifetime of `self`. pub fn families(&self) -> &[(PathBuf, Result)] { self.families .get_or_init(|| iter_families(&self.repo_dir, self.family_filter.as_ref()).collect()) .as_slice() } /// Lookup a language by its identifier. /// /// The `lang_id` should be the language identifier used by the /// `google-fonts-languages` crate (for example "en_Latn"). Returns /// `Some(&LanguageProto)` if the language is known, otherwise `None`. /// This is a simple passthrough to the bundled `LANGUAGES` map. pub fn language(&self, lang_id: &str) -> Option<&LanguageProto> { LANGUAGES.get(lang_id).map(|l| &**l) } fn family_by_font_file(&self) -> &HashMap { self.family_by_font_file.get_or_init(|| { self.families() .iter() .enumerate() .filter(|(_, (_, f))| f.is_ok()) .flat_map(|(i, (_, f))| { f.as_ref() .unwrap() .fonts .iter() .map(move |f| (f.filename().to_string(), i)) }) .collect() }) } /// Given a `FontProto`, return the family it belongs to. /// /// If the provided font is known (by filename) this returns `Some((path, family))` /// where `path` is the path to the family's `METADATA.pb` and `family` is /// a borrowed `FamilyProto`. Returns `None` if the font is not present in /// the discovered families. pub fn family(&self, font: &FontProto) -> Option<(&Path, &FamilyProto)> { self.family_by_font_file() .get(font.filename()) .copied() .map(|i| { let (p, f) = &self.families()[i]; (p.as_path(), f.as_ref().unwrap()) }) } /// Find the path to the font binary for a `FontProto`. /// /// This resolves the font's family, then constructs the filesystem path /// to the font file (sibling to the family's `METADATA.pb`). If the /// resulting file exists its `PathBuf` is returned. If the file cannot /// be found `None` is returned. A diagnostic is printed to stderr when /// the expected file is missing. pub fn find_font_binary(&self, font: &FontProto) -> Option { let (family_path, _) = self.family(font)?; let mut font_file = family_path.parent().unwrap().to_path_buf(); font_file.push(font.filename()); if !font_file.exists() { eprintln!("No such file as {font_file:?}"); } font_file.exists().then_some(font_file) } /// Our best guess at the primary language for this family /// /// Meant to be a good choice for things like rendering a sample string /// Guess the primary language for a family. /// /// The heuristic is: /// 1. If the family declares a `primary_language` that maps to a known /// language, return that. /// 2. Otherwise if the family declares a `primary_script`, pick the most /// populous language using that script. /// 3. Fall back to `en_Latn` if nothing else matches. /// /// This is intended as a best-effort choice to select a reasonable /// language for rendering sample text, not as an authoritative mapping. pub fn primary_language(&self, family: &FamilyProto) -> &LanguageProto { // Probe primary lang, primary script, then default baselessly to latin let mut primary_language: Option<&LanguageProto> = None; if primary_language.is_none() && family.has_primary_language() { if let Some(lang) = self.language(family.primary_language()) { primary_language = Some(lang); } else { eprintln!( "{} specifies invalid primary_language {}", family.name(), family.primary_language() ); } } if primary_language.is_none() && family.has_primary_script() { // If our script matches many languages pick the one with the highest population let lang = LANGUAGES .values() .filter(|l| l.script.is_some() && l.script() == family.primary_script()) .reduce(|acc, e| { if acc.population() > e.population() { acc } else { e } }); if let Some(lang) = lang { primary_language = Some(lang); } else { eprintln!( "{} specifies a primary_script that matches no languages {}", family.name(), family.primary_script() ); } } if primary_language.is_none() { primary_language = self.language("en_Latn"); } primary_language .unwrap_or_else(|| panic!("Not even our final fallback worked for {}", family.name())) } } #[cfg(test)] mod tests { use std::fs; use super::*; fn testdata_dir() -> std::path::PathBuf { // cargo test seems to run in the project directory // VSCode test seems to run in the workspace directory // probe for the file we want in hopes of finding it regardless ["./resources/testdata", "../resources/testdata"] .iter() .map(std::path::PathBuf::from) .find(|pb| pb.exists()) .unwrap() } fn testdata_file_content(relative_path: &str) -> String { let mut p = testdata_dir(); p.push(relative_path); fs::read_to_string(p).unwrap() } #[test] fn roboto_exemplar() { let roboto = read_family(&testdata_file_content("roboto-metadata.pb")).unwrap(); let exemplar = exemplar(&roboto).unwrap(); assert_eq!("Roboto[wdth,wght].ttf", exemplar.filename()); } #[test] fn wix_exemplar() { let roboto = read_family(&testdata_file_content("wixmadefortext-metadata.pb")).unwrap(); let exemplar = exemplar(&roboto).unwrap(); assert_eq!("WixMadeforText[wght].ttf", exemplar.filename()); } #[test] fn parse_roboto_metadata() { read_family(&testdata_file_content("roboto-metadata.pb")).unwrap(); } #[test] fn parse_wix_metadata() { // Has the undocumented position field read_family(&testdata_file_content("wixmadefortext-metadata.pb")).unwrap(); } #[test] fn parse_primary_lang_script_metadata() { let family = read_family(&testdata_file_content("kosugimaru-metadata.pb")).unwrap(); assert_eq!( ("Jpan", "Invalid"), (family.primary_script(), family.primary_language()) ); } #[test] fn parse_tag3() { Tagging::from_str("Roboto Slab, /quant/stroke_width_min, 26.31").expect("To parse"); } #[test] fn parse_tag4() { Tagging::from_str("Roboto Slab, wght@100, /quant/stroke_width_min, 26.31") .expect("To parse"); } #[test] fn parse_tag_quoted() { Tagging::from_str("Georama, \"ital,wght@1,100\", /quant/stroke_width_min, 16.97") .expect("To parse"); } #[test] fn parse_tag_quoted2() { Tagging::from_str("\"\",t,1").expect("To parse"); } }