avm2: Replaced stubs in Font with new format
This commit is contained in:
parent
af73a1a292
commit
ff768a1e73
|
@ -9,6 +9,7 @@ use crate::avm2::Error;
|
|||
use crate::avm2::Multiname;
|
||||
use crate::avm2::Namespace;
|
||||
use crate::avm2::QName;
|
||||
use crate::avm2_stub_getter;
|
||||
use crate::character::Character;
|
||||
use crate::string::AvmString;
|
||||
use gc_arena::{GcCell, MutationContext};
|
||||
|
@ -155,22 +156,24 @@ pub fn has_glyphs<'gc>(
|
|||
Ok(Value::Undefined)
|
||||
}
|
||||
|
||||
/// Stub `Font.enumerateFonts`
|
||||
/// `Font.enumerateFonts`
|
||||
pub fn enumerate_fonts<'gc>(
|
||||
_activation: &mut Activation<'_, 'gc>,
|
||||
activation: &mut Activation<'_, 'gc>,
|
||||
_this: Option<Object<'gc>>,
|
||||
_args: &[Value<'gc>],
|
||||
) -> Result<Value<'gc>, Error<'gc>> {
|
||||
Err("Font.enumerateFonts is a stub".into())
|
||||
avm2_stub_getter!(activation, "flash.text.Font", "enumerateFonts");
|
||||
Ok(Value::Undefined)
|
||||
}
|
||||
|
||||
/// Stub `Font.registerFont`
|
||||
/// `Font.registerFont`
|
||||
pub fn register_font<'gc>(
|
||||
_activation: &mut Activation<'_, 'gc>,
|
||||
activation: &mut Activation<'_, 'gc>,
|
||||
_this: Option<Object<'gc>>,
|
||||
_args: &[Value<'gc>],
|
||||
) -> Result<Value<'gc>, Error<'gc>> {
|
||||
Err("Font.registerFont is a stub".into())
|
||||
avm2_stub_getter!(activation, "flash.text.Font", "registerFont");
|
||||
Ok(Value::Undefined)
|
||||
}
|
||||
|
||||
/// Construct `Font`'s class.
|
||||
|
|
Loading…
Reference in New Issue