/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use std::cell::UnsafeCell; use std::mem; use std::ptr; use winapi::shared::minwindef::{FALSE, TRUE}; use winapi::shared::winerror::S_OK; use winapi::um::dwrite::IDWriteFont; use winapi::um::dwrite::IDWriteFontFace; use winapi::um::dwrite::IDWriteFontFamily; use winapi::um::dwrite::IDWriteLocalizedStrings; use winapi::um::dwrite::DWRITE_FONT_METRICS; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_COPYRIGHT_NOTICE; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_DESCRIPTION; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_DESIGNER; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_DESIGNER_URL; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_DESIGN_SCRIPT_LANGUAGE_TAG; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_FONT_VENDOR_URL; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_FULL_NAME; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_ID; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_LICENSE_DESCRIPTION; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_LICENSE_INFO_URL; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_MANUFACTURER; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_CID_NAME; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_NAME; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_PREFERRED_FAMILY_NAMES; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_PREFERRED_SUBFAMILY_NAMES; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_SAMPLE_TEXT; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_SUPPORTED_SCRIPT_LANGUAGE_TAG; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_TRADEMARK; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_VERSION_STRINGS; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_WIN32_SUBFAMILY_NAMES; use winapi::um::dwrite::DWRITE_INFORMATIONAL_STRING_WWS_FAMILY_NAME; use winapi::um::dwrite_1::{IDWriteFont1, DWRITE_FONT_METRICS1}; use wio::com::ComPtr;
usesuper::*; use helpers::*;
pubstruct Font {
native: UnsafeCell<ComPtr<IDWriteFont>>,
}
impl Font { pubfn take(native: ComPtr<IDWriteFont>) -> Font {
Font {
native: UnsafeCell::new(native),
}
}
/// A wrapper around the `DWRITE_FONT_METRICS` and `DWRITE_FONT_METRICS1` types. pubenum FontMetrics { /// Windows 7.
Metrics0(DWRITE_FONT_METRICS), /// Windows 8 and up.
Metrics1(DWRITE_FONT_METRICS1),
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.