@@ -1335,7 +1335,7 @@ impl ParsedFont {
1335
1335
1336
1336
let mut index_to_cid: BTreeMap < u16 , u16 > = BTreeMap :: new ( ) ;
1337
1337
1338
- let mut font_type = FontType :: default ( ) ;
1338
+ let font_type;
1339
1339
let glyph_records_decoded = if font. glyph_table_flags . contains ( GlyphTableFlags :: CFF )
1340
1340
&& provider. sfnt_version ( ) == tag:: OTTO
1341
1341
{
@@ -2246,8 +2246,8 @@ mod azul_convert {
2246
2246
2247
2247
pub ( super ) fn convert_to_azul_parsed_font (
2248
2248
font : & crate :: font:: ParsedFont ,
2249
- ) -> azul_layout:: text2 :: shaping :: ParsedFont {
2250
- azul_layout:: text2 :: shaping :: ParsedFont {
2249
+ ) -> azul_layout:: parsedfont :: ParsedFont {
2250
+ azul_layout:: parsedfont :: ParsedFont {
2251
2251
font_metrics : convert_font_metrics ( & font. font_metrics ) ,
2252
2252
num_glyphs : font. num_glyphs ,
2253
2253
hmtx_data : font. hmtx_data . clone ( ) ,
@@ -2344,21 +2344,26 @@ mod azul_convert {
2344
2344
2345
2345
fn convert_glyph_records (
2346
2346
records : & BTreeMap < u16 , crate :: font:: OwnedGlyph > ,
2347
- ) -> BTreeMap < u16 , azul_layout:: text2 :: shaping :: OwnedGlyph > {
2347
+ ) -> BTreeMap < u16 , azul_layout:: parsedfont :: OwnedGlyph > {
2348
2348
records
2349
2349
. iter ( )
2350
2350
. map ( |( k, v) | {
2351
2351
(
2352
2352
* k,
2353
- azul_layout:: text2:: shaping:: OwnedGlyph {
2354
- bounding_box : azul_layout:: text2:: shaping:: OwnedGlyphBoundingBox {
2353
+ azul_layout:: parsedfont:: OwnedGlyph {
2354
+ phantom_points : None ,
2355
+ unresolved_composite : Vec :: new ( ) ,
2356
+ bounding_box : azul_core:: app_resources:: OwnedGlyphBoundingBox {
2355
2357
max_x : v. bounding_box . max_x ,
2356
2358
max_y : v. bounding_box . max_y ,
2357
2359
min_x : v. bounding_box . min_x ,
2358
2360
min_y : v. bounding_box . min_y ,
2359
2361
} ,
2360
2362
horz_advance : v. horz_advance ,
2361
- outline : v. outline . as_ref ( ) . map ( |o| convert_glyph_outline ( o) ) ,
2363
+ outline : match v. outline . as_ref ( ) . map ( |o| convert_glyph_outline ( o) ) {
2364
+ Some ( s) => vec ! [ s] ,
2365
+ None => Vec :: new ( ) ,
2366
+ } ,
2362
2367
} ,
2363
2368
)
2364
2369
} )
@@ -2367,15 +2372,15 @@ mod azul_convert {
2367
2372
2368
2373
fn convert_glyph_outline (
2369
2374
outline : & crate :: font:: GlyphOutline ,
2370
- ) -> azul_layout :: text2 :: shaping :: GlyphOutline {
2371
- azul_layout :: text2 :: shaping :: GlyphOutline {
2375
+ ) -> azul_core :: app_resources :: GlyphOutline {
2376
+ azul_core :: app_resources :: GlyphOutline {
2372
2377
operations : convert_glyph_outline_operations ( & outline. operations ) ,
2373
2378
}
2374
2379
}
2375
2380
2376
2381
fn convert_glyph_outline_operations (
2377
2382
ops : & [ crate :: font:: GlyphOutlineOperation ] ,
2378
- ) -> azul_layout :: text2 :: shaping :: GlyphOutlineOperationVec {
2383
+ ) -> azul_core :: app_resources :: GlyphOutlineOperationVec {
2379
2384
ops. iter ( )
2380
2385
. map ( to_azul_glyph_outline_operation)
2381
2386
. collect :: < Vec < _ > > ( )
@@ -2385,12 +2390,8 @@ mod azul_convert {
2385
2390
/// Convert from printpdf GlyphOutlineOperation to azul_layout GlyphOutlineOperation
2386
2391
fn to_azul_glyph_outline_operation (
2387
2392
op : & crate :: font:: GlyphOutlineOperation ,
2388
- ) -> azul_layout:: text2:: shaping:: GlyphOutlineOperation {
2389
- use azul_layout:: text2:: shaping:: {
2390
- GlyphOutlineOperation as AzulOp , OutlineCubicTo , OutlineLineTo , OutlineMoveTo ,
2391
- OutlineQuadTo ,
2392
- } ;
2393
-
2393
+ ) -> azul_core:: app_resources:: GlyphOutlineOperation {
2394
+ use azul_core:: app_resources:: { GlyphOutlineOperation as AzulOp , OutlineQuadTo , OutlineLineTo , OutlineCubicTo , OutlineMoveTo } ;
2394
2395
use crate :: font:: GlyphOutlineOperation as PdfOp ;
2395
2396
2396
2397
match op {
0 commit comments