- Timestamp:
- 2013-01-15T22:49:23+13:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/html-to-expeditee/trunk/src/perllib/CssStyleToExpAttr.pm
r26727 r26728 353 353 354 354 355 #if ($css_font_size =~ m/^(\d+(?:\.\d*))px$/) { 356 # $exp_font_size = int($1); 357 #} 358 359 $css_font_size =~ s/[^0-9]//g; 360 361 if(defined $css_font_size){ 362 $exp_font_size = $css_font_size; 355 if ($css_font_size =~ m/^(\d+(?:\.\d*))px$/) { 356 $exp_font_size = int($1); 357 } 358 359 return $exp_font_size; 360 } 361 362 sub convert_font_face 363 { 364 my ($css_font_face) = @_; 365 my $exp_font_face = undef; 366 367 if(lc($css_font_face) eq "bold"){ 368 $exp_font_face = "b"; 369 }else{ #for now - also need to take into account italic and italic bold. 370 $exp_font_face = "r"; 363 371 } 364 372 365 return $exp_font_size;373 return $exp_font_face; 366 374 } 367 375 … … 405 413 if(defined $font_specific_family_lookup->{lc($css_font_family)}){ 406 414 $exp_font_family = $css_font_family."_"; 415 }else{ 416 417 #to account for instances where a list of fonts is stored as the font family, e.g. "Arial,Segoe...Sans-Serif". 418 #just extract the first font name from this list. 419 my @font_family_vals = split(',',$css_font_family); 420 421 if(scalar(@font_family_vals) > 0){ 422 $exp_font_family = $font_family_vals[0]."_"; 423 } 424 407 425 } 408 409 print STDERR "**** TESTING TESTING ".$font_specific_family_lookup->{"georgia"}."\n";410 print STDERR "**** TESTING TESTING ".$font_specific_family_lookup->{lc($css_font_family)}."\n";411 print STDERR "**** TESTING TESTING ".$font_specific_family_lookup->{$css_font_family}."\n";412 print STDERR "In CssStyleToExpAttr: font family attribute: $exp_font_family ******* \n";413 426 414 427 return $exp_font_family;
Note:
See TracChangeset
for help on using the changeset viewer.