Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove JosefinSans and related works #409

Merged
merged 1 commit into from May 2, 2013
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Binary file not shown.

This file was deleted.

@@ -151,7 +151,6 @@ pub impl FontDescriptor {
#[deriving(Eq)]
pub enum FontSelector {
SelectorPlatformIdentifier(~str),
SelectorStubDummy, // aka, use Josephin Sans
}

// This struct is the result of mapping a specified FontStyle into the
@@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

use font::{Font, FontDescriptor, FontGroup, FontStyle, SelectorPlatformIdentifier};
use font::{SelectorStubDummy, SpecifiedFontStyle, UsedFontStyle};
use font::{SpecifiedFontStyle, UsedFontStyle};
use font_context;
use font_list::FontList;
use servo_util::cache::Cache;
@@ -14,13 +14,6 @@ use platform::font_context::FontContextHandle;
use azure::azure_hl::BackendType;
use core::hashmap::HashMap;

// TODO(Issue #164): delete, and get default font from font list
static TEST_FONT: [u8, ..33004] = include_bin!("JosefinSans-SemiBold.ttf");

fn test_font_bin() -> ~[u8] {
return vec::from_fn(33004, |i| TEST_FONT[i]);
}

// TODO(Rust #3934): creating lots of new dummy styles is a workaround
// for not being able to store symbolic enums in top-level constants.
pub fn dummy_style() -> FontStyle {
@@ -135,18 +128,6 @@ pub impl<'self> FontContext {
}
}

// TODO(Issue #194): *always* attach a fallback font to the
// font list, so that this assertion will never fail.

// assert fonts.len() > 0;
if fonts.len() == 0 {
let desc = FontDescriptor::new(font_context::dummy_style(), SelectorStubDummy);
debug!("(create font group) trying descriptor `%?`", desc);
match self.get_font_by_descriptor(&desc) {
Ok(instance) => fonts.push(instance),
Err(()) => {}
}
}
assert!(fonts.len() > 0);
// TODO(Issue #179): Split FontStyle into specified and used styles
let used_style = copy *style;
@@ -158,9 +139,6 @@ pub impl<'self> FontContext {

priv fn create_font_instance(&self, desc: &FontDescriptor) -> Result<@mut Font, ()> {
return match &desc.selector {
&SelectorStubDummy => {
Font::new_from_buffer(self, test_font_bin(), &desc.style, self.backend)
},
// TODO(Issue #174): implement by-platform-name font selectors.
&SelectorPlatformIdentifier(ref identifier) => {
let result_handle = self.handle.create_font_from_identifier(copy *identifier,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.