servo-fontconfig-0.5.1/.cargo_vcs_info.json0000644000000001121370163453300144240ustar00{ "git": { "sha1": "a1d1a83a7afe4eed29cc0675d561000cab35ac3f" } } servo-fontconfig-0.5.1/.gitignore010064400007650000024000000000341370163452300152150ustar0000000000000000*~ /doc /target /Cargo.lock servo-fontconfig-0.5.1/.travis.yml010064400007650000024000000001541370163452300153410ustar0000000000000000language: rust sudo: false rust: - nightly notifications: webhooks: http://build.servo.org:54856/travis servo-fontconfig-0.5.1/COPYRIGHT010064400007650000024000000005011370163452300145170ustar0000000000000000Licensed under the Apache License, Version 2.0 or the MIT license , at your option. All files in the project carrying such notice may not be copied, modified, or distributed except according to those terms. servo-fontconfig-0.5.1/Cargo.toml0000644000000017431370163453300124350ustar00# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're # editing this file be aware that the upstream Cargo.toml # will likely look very different (and much more reasonable) [package] name = "servo-fontconfig" version = "0.5.1" authors = ["The Servo Project Developers"] description = "Rust bindings for fontconfig" documentation = "https://docs.rs/servo-fontconfig" license = "MIT / Apache-2.0" repository = "https://github.com/servo/rust-fontconfig/" [lib] name = "fontconfig" [dependencies.libc] version = "0.2" [dependencies.servo-fontconfig-sys] version = "5.1.0" [features] force_system_lib = ["servo-fontconfig-sys/force_system_lib"] servo-fontconfig-0.5.1/Cargo.toml.orig010064400007650000024000000006671370163452300161300ustar0000000000000000[package] name = "servo-fontconfig" version = "0.5.1" authors = ["The Servo Project Developers"] repository = "https://github.com/servo/rust-fontconfig/" documentation = "https://docs.rs/servo-fontconfig" description = "Rust bindings for fontconfig" license= "MIT / Apache-2.0" [lib] name = "fontconfig" [dependencies] servo-fontconfig-sys = "5.1.0" libc = "0.2" [features] force_system_lib = ["servo-fontconfig-sys/force_system_lib"] servo-fontconfig-0.5.1/LICENSE-APACHE010064400007650000024000000251371370163452300151640ustar0000000000000000 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. servo-fontconfig-0.5.1/LICENSE-MIT010064400007650000024000000020531370163452300146640ustar0000000000000000Copyright (c) 2012-2013 Mozilla Foundation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. servo-fontconfig-0.5.1/Makefile.in010064400007650000024000000020041370163452300152710ustar0000000000000000VPATH=%VPATH% CC ?= gcc CXX ?= g++ CXXFLAGS ?= AR ?= ar RUSTC ?= rustc RUSTFLAGS ?= EXT_DEPS ?= RUSTDOC ?= rustdoc RUSTDOC_FLAGS ?= RUSTDOC_TARGET ?= doc ifeq ($(CFG_OSTYPE),linux-androideabi) RUSTFLAGS += -L./../../android/fontconfig/src/.libs else ifeq ($(CFG_OSTYPE),unknown-linux-gnu) RUSTFLAGS += -L./../../linux/fontconfig/src/.libs endif RUST_SRC=$(shell find $(VPATH)/src -type f -name '*.rs') .PHONY: all all: libfontconfig-servo.dummy %.o: %.c $(CC) $< -o $@ -c $(CFLAGS) libfontconfig-servo.dummy: src/lib.rs $(RUST_SRC) $(EXT_DEPS) $(RUSTC) $(RUSTFLAGS) $< --out-dir . -C extra-filename=-servo touch $@ fontconfig-test: src/lib.rs $(RUST_SRC) $(RUSTC) $(RUSTFLAGS) $< -o $@ --test .PHONY: check check: fontconfig-test ./fontconfig-test .PHONY: doc doc: $(RUSTDOC_TARGET)/fontconfig/index.html $(RUSTDOC_TARGET)/fontconfig/index.html: src/lib.rs $(RUST_SRC) $(EXT_DEPS) $(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET) .PHONY: clean clean: rm -f *.o *.a *.so *.dylib *.rlib *.dll *.dummy *-test servo-fontconfig-0.5.1/README.md010064400007650000024000000006461370163452300145150ustar0000000000000000# servo-fontconfig Rust bindings to [Fontconfig](http://fontconfig.org/). * [Documentation](https://docs.rs/servo-fontconfig) * [crates.io](https://crates.io/crates/servo-fontconfig) ## Release notes ### 0.3.0 * [breaking change] Fixed pointer types in some function signatures (#33). ### 0.2.1 * Updated dependencies ### 0.2.0 * [breaking change] Changed crate name to `fontconfig` ### 0.1.0 * Initial release servo-fontconfig-0.5.1/configure010075500007650000024000000001561370163452300151410ustar0000000000000000#!/bin/bash SRCDIR="$(cd $(dirname $0) && pwd)" sed "s#%VPATH%#${SRCDIR}#" ${SRCDIR}/Makefile.in > Makefile servo-fontconfig-0.5.1/src/fontconfig.rs010064400007650000024000000443521370163452300165310ustar0000000000000000// Copyright 2013 The Servo Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] use libc::*; pub type FcChar8 = c_uchar; pub type FcChar16 = c_ushort; pub type FcChar32 = c_uint; pub type FcBool = c_int; pub type enum__FcType = c_uint; pub const FcTypeVoid: u32 = 0_u32; pub const FcTypeInteger: u32 = 1_u32; pub const FcTypeDouble: u32 = 2_u32; pub const FcTypeString: u32 = 3_u32; pub const FcTypeBool: u32 = 4_u32; pub const FcTypeMatrix: u32 = 5_u32; pub const FcTypeCharSet: u32 = 6_u32; pub const FcTypeFTFace: u32 = 7_u32; pub const FcTypeLangSet: u32 = 8_u32; pub type FcType = enum__FcType; pub const FC_WEIGHT_THIN: c_int = 0; pub const FC_WEIGHT_EXTRALIGHT: c_int = 40; pub const FC_WEIGHT_ULTRALIGHT: c_int = FC_WEIGHT_EXTRALIGHT; pub const FC_WEIGHT_LIGHT: c_int = 50; pub const FC_WEIGHT_BOOK: c_int = 75; pub const FC_WEIGHT_REGULAR: c_int = 80; pub const FC_WEIGHT_NORMAL: c_int = FC_WEIGHT_REGULAR; pub const FC_WEIGHT_MEDIUM: c_int = 100; pub const FC_WEIGHT_DEMIBOLD: c_int = 180; pub const FC_WEIGHT_SEMIBOLD: c_int = FC_WEIGHT_DEMIBOLD; pub const FC_WEIGHT_BOLD: c_int = 200; pub const FC_WEIGHT_EXTRABOLD: c_int = 205; pub const FC_WEIGHT_ULTRABOLD: c_int = FC_WEIGHT_EXTRABOLD; pub const FC_WEIGHT_BLACK: c_int = 210; pub const FC_WEIGHT_HEAVY: c_int = FC_WEIGHT_BLACK; pub const FC_WEIGHT_EXTRABLACK: c_int = 215; pub const FC_WEIGHT_ULTRABLACK: c_int = FC_WEIGHT_EXTRABLACK; pub const FC_SLANT_ROMAN: c_int = 0; pub const FC_SLANT_ITALIC: c_int = 100; pub const FC_SLANT_OBLIQUE: c_int = 110; #[repr(C)] #[derive(Copy, Clone)] pub struct struct__FcMatrix { pub xx: c_double, pub xy: c_double, pub yx: c_double, pub yy: c_double, } pub type FcMatrix = struct__FcMatrix; pub type struct__FcCharSet = c_void; pub type FcCharSet = struct__FcCharSet; #[repr(C)] #[allow(missing_copy_implementations)] pub struct struct__FcObjectType { pub object: *mut c_char, pub _type: FcType, } pub type FcObjectType = struct__FcObjectType; #[repr(C)] #[allow(missing_copy_implementations)] pub struct struct__FcConstant { pub name: *mut FcChar8, pub object: *mut c_char, pub value: c_int, } pub type FcConstant = struct__FcConstant; pub type enum__FcResult = c_uint; pub const FcResultMatch: u32 = 0_u32; pub const FcResultNoMatch: u32 = 1_u32; pub const FcResultTypeMismatch: u32 = 2_u32; pub const FcResultNoId: u32 = 3_u32; pub const FcResultOutOfMemory: u32 = 4_u32; pub type FcResult = enum__FcResult; pub type struct__FcPattern = c_void; pub type FcPattern = struct__FcPattern; pub type struct__FcLangSet = c_void; pub type FcLangSet = struct__FcLangSet; #[repr(C)] #[allow(missing_copy_implementations)] pub struct struct__FcValue { pub _type: FcType, pub u: union_unnamed1, } pub type FcValue = struct__FcValue; #[repr(C)] #[allow(missing_copy_implementations)] pub struct struct__FcFontSet { pub nfont: c_int, pub sfont: c_int, pub fonts: *mut *mut FcPattern, } pub type FcFontSet = struct__FcFontSet; #[repr(C)] #[allow(missing_copy_implementations)] pub struct struct__FcObjectSet { pub nobject: c_int, pub sobject: c_int, pub objects: *mut *mut c_char, } pub type FcObjectSet = struct__FcObjectSet; pub type enum__FcMatchKind = c_uint; pub const FcMatchPattern: u32 = 0_u32; pub const FcMatchFont: u32 = 1_u32; pub const FcMatchScan: u32 = 2_u32; pub type FcMatchKind = enum__FcMatchKind; pub type enum__FcLangResult = c_uint; pub const FcLangEqual: u32 = 0_u32; pub const FcLangDifferentCountry: u32 = 1_u32; pub const FcLangDifferentTerritory: u32 = 1_u32; pub const FcLangDifferentLang: u32 = 2_u32; pub type FcLangResult = enum__FcLangResult; pub type enum__FcSetName = c_uint; pub const FcSetSystem: u32 = 0_u32; pub const FcSetApplication: u32 = 1_u32; pub type FcSetName = enum__FcSetName; pub type struct__FcAtomic = c_void; pub type FcAtomic = struct__FcAtomic; pub type FcEndian = c_uint; pub const FcEndianBig: u32 = 0_u32; pub const FcEndianLittle: u32 = 1_u32; pub type struct__FcConfig = c_void; pub type FcConfig = struct__FcConfig; pub type struct__FcGlobalCache = c_void; pub type FcFileCache = struct__FcGlobalCache; pub type struct__FcBlanks = c_void; pub type FcBlanks = struct__FcBlanks; pub type struct__FcStrList = c_void; pub type FcStrList = struct__FcStrList; pub type struct__FcStrSet = c_void; pub type FcStrSet = struct__FcStrSet; pub type struct__FcCache = c_void; pub type FcCache = struct__FcCache; pub type union_unnamed1 = c_void /* FIXME: union type */; extern { pub fn FcBlanksCreate() -> *mut FcBlanks; pub fn FcBlanksDestroy(b: *mut FcBlanks); pub fn FcBlanksAdd(b: *mut FcBlanks, ucs4: FcChar32) -> FcBool; pub fn FcBlanksIsMember(b: *mut FcBlanks, ucs4: FcChar32) -> FcBool; pub fn FcCacheDir(c: *mut FcCache) -> *const FcChar8; pub fn FcCacheCopySet(c: *const FcCache) -> *mut FcFontSet; pub fn FcCacheSubdir(c: *const FcCache, i: c_int) -> *const FcChar8; pub fn FcCacheNumSubdir(c: *const FcCache) -> c_int; pub fn FcCacheNumFont(c: *const FcCache) -> c_int; pub fn FcDirCacheUnlink(dir: *const FcChar8, config: *mut FcConfig) -> FcBool; pub fn FcDirCacheValid(cache_file: *const FcChar8) -> FcBool; pub fn FcConfigHome() -> *mut FcChar8; pub fn FcConfigEnableHome(enable: FcBool) -> FcBool; pub fn FcConfigFilename(url: *const FcChar8) -> *mut FcChar8; pub fn FcConfigCreate() -> *mut FcConfig; pub fn FcConfigReference(config: *mut FcConfig) -> *mut FcConfig; pub fn FcConfigDestroy(config: *mut FcConfig); pub fn FcConfigSetCurrent(config: *mut FcConfig) -> FcBool; pub fn FcConfigGetCurrent() -> *mut FcConfig; pub fn FcConfigUptoDate(config: *mut FcConfig) -> FcBool; pub fn FcConfigBuildFonts(config: *mut FcConfig) -> FcBool; pub fn FcConfigGetFontDirs(config: *mut FcConfig) -> *mut FcStrList; pub fn FcConfigGetConfigDirs(config: *mut FcConfig) -> *mut FcStrList; pub fn FcConfigGetConfigFiles(config: *mut FcConfig) -> *mut FcStrList; pub fn FcConfigGetCache(config: *mut FcConfig) -> *mut FcChar8; pub fn FcConfigGetBlanks(config: *mut FcConfig) -> *mut FcBlanks; pub fn FcConfigGetCacheDirs(config: *const FcConfig) -> *mut FcStrList; pub fn FcConfigGetRescanInterval(config: *mut FcConfig) -> c_int; pub fn FcConfigSetRescanInterval(config: *mut FcConfig, rescanInterval: c_int) -> FcBool; pub fn FcConfigGetFonts(config: *mut FcConfig, set: FcSetName) -> *mut FcFontSet; pub fn FcConfigAppFontAddFile(config: *mut FcConfig, file: *const FcChar8) -> FcBool; pub fn FcConfigAppFontAddDir(config: *mut FcConfig, dir: *const FcChar8) -> FcBool; pub fn FcConfigAppFontClear(config: *mut FcConfig); pub fn FcConfigSubstituteWithPat(config: *mut FcConfig, p: *mut FcPattern, p_pat: *mut FcPattern, kind: FcMatchKind) -> FcBool; pub fn FcConfigSubstitute(config: *mut FcConfig, p: *mut FcPattern, kind: FcMatchKind) -> FcBool; pub fn FcCharSetCreate() -> *mut FcCharSet; pub fn FcCharSetNew() -> *mut FcCharSet; pub fn FcCharSetDestroy(fcs: *mut FcCharSet); pub fn FcCharSetAddChar(fcs: *mut FcCharSet, ucs4: FcChar32) -> FcBool; pub fn FcCharSetCopy(src: *mut FcCharSet) -> *mut FcCharSet; pub fn FcCharSetEqual(a: *const FcCharSet, b: *const FcCharSet) -> FcBool; pub fn FcCharSetIntersect(a: *const FcCharSet, b: *const FcCharSet) -> *mut FcCharSet; pub fn FcCharSetUnion(a: *const FcCharSet, b: *const FcCharSet) -> *mut FcCharSet; pub fn FcCharSetSubtract(a: *const FcCharSet, b: *const FcCharSet) -> *mut FcCharSet; pub fn FcCharSetMerge(a: *mut FcCharSet, b: *const FcCharSet, changed: *mut FcBool) -> FcBool; pub fn FcCharSetHasChar(fcs: *const FcCharSet, ucs4: FcChar32) -> FcBool; pub fn FcCharSetCount(a: *const FcCharSet) -> FcChar32; pub fn FcCharSetIntersectCount(a: *const FcCharSet, b: *const FcCharSet) -> FcChar32; pub fn FcCharSetSubtractCount(a: *const FcCharSet, b: *const FcCharSet) -> FcChar32; pub fn FcCharSetIsSubset(a: *const FcCharSet, bi: *const FcCharSet) -> FcBool; pub fn FcCharSetFirstPage(a: *const FcCharSet, map: *mut FcChar32, next: *mut FcChar32) -> FcChar32; pub fn FcCharSetNextPage(a: *const FcCharSet, map: *mut FcChar32, next: *mut FcChar32) -> FcChar32; pub fn FcCharSetCoverage(a: *const FcCharSet, page: FcChar32, result: *mut FcChar32) -> FcChar32; pub fn FcValuePrint(v: FcValue); pub fn FcPatternPrint(p: *const FcPattern); pub fn FcFontSetPrint(s: *mut FcFontSet); pub fn FcDefaultSubstitute(pattern: *mut FcPattern); pub fn FcFileIsDir(file: *const FcChar8) -> FcBool; pub fn FcFileScan(set: *mut FcFontSet, dirs: *mut FcStrSet, cache: *mut FcFileCache, blanks: *mut FcBlanks, file: *const FcChar8, force: FcBool) -> FcBool; pub fn FcDirScan(set: *mut FcFontSet, dirs: *mut FcStrSet, cache: *mut FcFileCache, blanks: *mut FcBlanks, dir: *const FcChar8, force: FcBool) -> FcBool; pub fn FcDirSave(set: *mut FcFontSet, dirs: *const FcStrSet, dir: *mut FcChar8) -> FcBool; pub fn FcDirCacheLoad(dir: *const FcChar8, config: *mut FcConfig, cache_file: *mut *mut FcChar8) -> *mut FcCache; pub fn FcDirCacheRead(dir: *const FcChar8, force: FcBool, config: *mut FcConfig) -> *mut FcCache; //pub fn FcDirCacheLoadFile(cache_file: *mut FcChar8, file_stat: *mut struct_stat) -> *mut FcCache; pub fn FcDirCacheUnload(cache: *mut FcCache); pub fn FcFreeTypeQuery(file: *const FcChar8, id: c_int, blanks: *mut FcBlanks, count: *mut c_int) -> *mut FcPattern; pub fn FcFontSetCreate() -> *mut FcFontSet; pub fn FcFontSetDestroy(s: *mut FcFontSet); pub fn FcFontSetAdd(s: *mut FcFontSet, font: *mut FcPattern) -> FcBool; pub fn FcInitLoadConfig() -> *mut FcConfig; pub fn FcInitLoadConfigAndFonts() -> *mut FcConfig; pub fn FcInit() -> FcBool; pub fn FcFini(); pub fn FcGetVersion() -> c_int; pub fn FcInitReinitialize() -> FcBool; pub fn FcInitBringUptoDate() -> FcBool; pub fn FcGetLangs() -> *mut FcStrSet; pub fn FcLangGetCharSet(lang: *const FcChar8) -> *mut FcCharSet; pub fn FcLangSetCreate() -> *mut FcLangSet; pub fn FcLangSetDestroy(ls: *mut FcLangSet); pub fn FcLangSetCopy(ls: *const FcLangSet) -> *mut FcLangSet; pub fn FcLangSetAdd(ls: *mut FcLangSet, lang: *const FcChar8) -> FcBool; pub fn FcLangSetHasLang(ls: *const FcLangSet, lang: *const FcChar8) -> FcLangResult; pub fn FcLangSetCompare(lsa: *const FcLangSet, lsb: *const FcLangSet) -> FcLangResult; pub fn FcLangSetContains(lsa: *const FcLangSet, lsb: *const FcLangSet) -> FcBool; pub fn FcLangSetEqual(lsa: *const FcLangSet, lsb: *const FcLangSet) -> FcBool; pub fn FcLangSetHash(ls: *const FcLangSet) -> FcChar32; pub fn FcLangSetGetLangs(ls: *const FcLangSet) -> *mut FcStrSet; pub fn FcObjectSetCreate() -> *mut FcObjectSet; pub fn FcObjectSetAdd(os: *mut FcObjectSet, object: *const c_char) -> FcBool; pub fn FcObjectSetDestroy(os: *mut FcObjectSet); //pub fn FcObjectSetVaBuild(first: *mut c_char, va: *mut __va_list_tag) -> *mut FcObjectSet; pub fn FcObjectSetBuild(first: *mut c_char, ...) -> *mut FcObjectSet; pub fn FcFontSetList(config: *mut FcConfig, sets: *mut *mut FcFontSet, nsets: c_int, p: *mut FcPattern, os: *mut FcObjectSet) -> *mut FcFontSet; pub fn FcFontList(config: *mut FcConfig, p: *mut FcPattern, os: *mut FcObjectSet) -> *mut FcFontSet; pub fn FcAtomicCreate(file: *const FcChar8) -> *mut FcAtomic; pub fn FcAtomicLock(atomic: *mut FcAtomic) -> FcBool; pub fn FcAtomicNewFile(atomic: *mut FcAtomic) -> *mut FcChar8; pub fn FcAtomicOrigFile(atomic: *mut FcAtomic) -> *mut FcChar8; pub fn FcAtomicReplaceOrig(atomic: *mut FcAtomic) -> FcBool; pub fn FcAtomicDeleteNew(atomic: *mut FcAtomic); pub fn FcAtomicUnlock(atomic: *mut FcAtomic); pub fn FcAtomicDestroy(atomic: *mut FcAtomic); pub fn FcFontSetMatch(config: *mut FcConfig, sets: *mut *mut FcFontSet, nsets: c_int, p: *mut FcPattern, result: *mut FcResult) -> *mut FcPattern; pub fn FcFontMatch(config: *mut FcConfig, p: *mut FcPattern, result: *mut FcResult) -> *mut FcPattern; pub fn FcFontRenderPrepare(config: *mut FcConfig, pat: *mut FcPattern, font: *mut FcPattern) -> *mut FcPattern; pub fn FcFontSetSort(config: *mut FcConfig, sets: *mut *mut FcFontSet, nsets: c_int, p: *mut FcPattern, trim: FcBool, csp: *mut *mut FcCharSet, result: *mut FcResult) -> *mut FcFontSet; pub fn FcFontSort(config: *mut FcConfig, p: *mut FcPattern, trim: FcBool, csp: *mut *mut FcCharSet, result: *mut FcResult) -> *mut FcFontSet; pub fn FcFontSetSortDestroy(fs: *mut FcFontSet); pub fn FcMatrixCopy(mat: *const FcMatrix) -> *mut FcMatrix; pub fn FcMatrixEqual(mat1: *const FcMatrix, mat2: *const FcMatrix) -> FcBool; pub fn FcMatrixMultiply(result: *mut FcMatrix, a: *const FcMatrix, b: *const FcMatrix); pub fn FcMatrixRotate(m: *mut FcMatrix, c: c_double, s: c_double); pub fn FcMatrixScale(m: *mut FcMatrix, sx: c_double, sy: c_double); pub fn FcMatrixShear(m: *mut FcMatrix, sh: c_double, sv: c_double); pub fn FcNameRegisterObjectTypes(types: *const FcObjectType, ntype: c_int) -> FcBool; pub fn FcNameUnregisterObjectTypes(types: *const FcObjectType, ntype: c_int) -> FcBool; pub fn FcNameGetObjectType(object: *const c_char) -> *const FcObjectType; pub fn FcNameRegisterConstants(consts: *const FcConstant, nconsts: c_int) -> FcBool; pub fn FcNameUnregisterConstants(consts: *const FcConstant, nconsts: c_int) -> FcBool; pub fn FcNameGetConstant(string: *mut FcChar8) -> *const FcConstant; pub fn FcNameConstant(string: *mut FcChar8, result: *mut c_int) -> FcBool; pub fn FcNameParse(name: *const FcChar8) -> *mut FcPattern; pub fn FcNameUnparse(pat: *mut FcPattern) -> *mut FcChar8; pub fn FcPatternCreate() -> *mut FcPattern; pub fn FcPatternDuplicate(p: *const FcPattern) -> *mut FcPattern; pub fn FcPatternReference(p: *mut FcPattern); pub fn FcPatternFilter(p: *mut FcPattern, os: *const FcObjectSet) -> *mut FcPattern; pub fn FcValueDestroy(v: FcValue); pub fn FcValueEqual(va: FcValue, vb: FcValue) -> FcBool; pub fn FcValueSave(v: FcValue) -> FcValue; pub fn FcPatternDestroy(p: *mut FcPattern); pub fn FcPatternEqual(pa: *const FcPattern, pb: *const FcPattern) -> FcBool; pub fn FcPatternEqualSubset(pa: *const FcPattern, pb: *const FcPattern, os: *const FcObjectSet) -> FcBool; pub fn FcPatternHash(p: *const FcPattern) -> FcChar32; pub fn FcPatternAdd(p: *mut FcPattern, object: *const c_char, value: FcValue, append: FcBool) -> FcBool; pub fn FcPatternAddWeak(p: *mut FcPattern, object: *const c_char, value: FcValue, append: FcBool) -> FcBool; pub fn FcPatternGet(p: *mut FcPattern, object: *const c_char, id: c_int, v: *mut FcValue) -> FcResult; pub fn FcPatternDel(p: *mut FcPattern, object: *const c_char) -> FcBool; pub fn FcPatternRemove(p: *mut FcPattern, object: *const c_char, id: c_int) -> FcBool; pub fn FcPatternAddInteger(p: *mut FcPattern, object: *const c_char, i: c_int) -> FcBool; pub fn FcPatternAddDouble(p: *mut FcPattern, object: *const c_char, d: c_double) -> FcBool; pub fn FcPatternAddString(p: *mut FcPattern, object: *const c_char, s: *const FcChar8) -> FcBool; pub fn FcPatternAddMatrix(p: *mut FcPattern, object: *const c_char, s: *const FcMatrix) -> FcBool; pub fn FcPatternAddCharSet(p: *mut FcPattern, object: *const c_char, c: *const FcCharSet) -> FcBool; pub fn FcPatternAddBool(p: *mut FcPattern, object: *const c_char, b: FcBool) -> FcBool; pub fn FcPatternAddLangSet(p: *mut FcPattern, object: *const c_char, ls: *const FcLangSet) -> FcBool; pub fn FcPatternGetInteger(p: *mut FcPattern, object: *const c_char, n: c_int, i: *mut c_int) -> FcResult; pub fn FcPatternGetDouble(p: *mut FcPattern, object: *const c_char, n: c_int, d: *mut c_double) -> FcResult; pub fn FcPatternGetString(p: *mut FcPattern, object: *const c_char, n: c_int, s: *mut *mut FcChar8) -> FcResult; pub fn FcPatternGetMatrix(p: *mut FcPattern, object: *const c_char, n: c_int, s: *mut *mut FcMatrix) -> FcResult; pub fn FcPatternGetCharSet(p: *mut FcPattern, object: *const c_char, n: c_int, c: *mut *mut FcCharSet) -> FcResult; pub fn FcPatternGetBool(p: *mut FcPattern, object: *const c_char, n: c_int, b: *mut FcBool) -> FcResult; pub fn FcPatternGetLangSet(p: *mut FcPattern, object: *const c_char, n: c_int, ls: *mut *mut FcLangSet) -> FcResult; //pub fn FcPatternVaBuild(p: *mut FcPattern, va: *mut __va_list_tag) -> *mut FcPattern; pub fn FcPatternBuild(p: *mut FcPattern, ...) -> *mut FcPattern; pub fn FcPatternFormat(pat: *mut FcPattern, format: *const FcChar8) -> *mut FcChar8; pub fn FcStrCopy(s: *const FcChar8) -> *mut FcChar8; pub fn FcStrCopyFilename(s: *const FcChar8) -> *mut FcChar8; pub fn FcStrPlus(s1: *const FcChar8, s2: *const FcChar8) -> *mut FcChar8; pub fn FcStrFree(s: *mut FcChar8); pub fn FcStrDowncase(s: *const FcChar8) -> *mut FcChar8; pub fn FcStrCmpIgnoreCase(s1: *const FcChar8, s2: *const FcChar8) -> c_int; pub fn FcStrCmp(s1: *const FcChar8, s2: *const FcChar8) -> c_int; pub fn FcStrStrIgnoreCase(s1: *const FcChar8, s2: *const FcChar8) -> *mut FcChar8; pub fn FcStrStr(s1: *const FcChar8, s2: *const FcChar8) -> *mut FcChar8; pub fn FcUtf8ToUcs4(src_orig: *mut FcChar8, dst: *mut FcChar32, len: c_int) -> c_int; pub fn FcUtf8Len(string: *mut FcChar8, len: c_int, nchar: *mut c_int, wchar: *mut c_int) -> FcBool; pub fn FcUcs4ToUtf8(ucs4: FcChar32, dest: *mut FcChar8) -> c_int; pub fn FcUtf16ToUcs4(src_orig: *mut FcChar8, endian: FcEndian, dst: *mut FcChar32, len: c_int) -> c_int; pub fn FcUtf16Len(string: *mut FcChar8, endian: FcEndian, len: c_int, nchar: *mut c_int, wchar: *mut c_int) -> FcBool; pub fn FcStrDirname(file: *const FcChar8) -> *mut FcChar8; pub fn FcStrBasename(file: *const FcChar8) -> *mut FcChar8; pub fn FcStrSetCreate() -> *mut FcStrSet; pub fn FcStrSetMember(set: *mut FcStrSet, s: *const FcChar8) -> FcBool; pub fn FcStrSetEqual(sa: *mut FcStrSet, sb: *mut FcStrSet) -> FcBool; pub fn FcStrSetAdd(set: *mut FcStrSet, s: *const FcChar8) -> FcBool; pub fn FcStrSetAddFilename(set: *mut FcStrSet, s: *const FcChar8) -> FcBool; pub fn FcStrSetDel(set: *mut FcStrSet, s: *const FcChar8) -> FcBool; pub fn FcStrSetDestroy(set: *mut FcStrSet); pub fn FcStrListCreate(set: *mut FcStrSet) -> *mut FcStrList; pub fn FcStrListNext(list: *mut FcStrList) -> *mut FcChar8; pub fn FcStrListDone(list: *mut FcStrList); pub fn FcConfigParseAndLoad(config: *mut FcConfig, file: *const FcChar8, complain: FcBool) -> FcBool; } servo-fontconfig-0.5.1/src/lib.rs010064400007650000024000000010711370163452300151320ustar0000000000000000// Copyright 2013 The Servo Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. #![crate_type = "lib"] #![crate_type = "dylib"] #![crate_type = "rlib"] extern crate libc; extern crate fontconfig_sys; pub mod fontconfig;