Changeset 2676

Show
Ignore:
Timestamp:
04/28/08 01:03:24
Author:
miyagawa
Message:

pseudonymous

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • yapcasia2008/misc/nameplate-svg.pl

    r2674 r2676  
    2323my $out_dir = "$ENV{HOME}/Sites/yapc-nameplates"; 
    2424 
    25 my $font = '"M+ 1c"'; 
    26 #my $font = 'Helvetica'; 
     25#my $font = '"M+ 1c"'; 
     26my $font = 'mplus-1c-medium'; 
    2727 
    2828my @users; 
     
    4646                 : length($name) > 16 ? 21  
    4747                 : 24; 
    48         $svg->text(x => $ox + 35, y => $oy + 55, style => { 'font-family' => $font, 'font-weight' => 'bold', 'color' => 'black', 'font-size' => $size })->cdata($name); 
    49         $svg->text(x => $ox + 35, y => $oy + 75, style => { 'font-family' => $font, 'color' => 'black', 'font-size' => 11 })->cdata(($ref->{pm_group} ? "$ref->{pm_group} / " : "") . code2country($ref->{country})); 
     48        $svg->text(x => $ox + 35, y => $oy + 55, style => { 'font-family' => $font, 'font-weight' => 'bold', 'color' => 'black', 'font-size' => $size }, 'font-family' => $font, 'font-size' => $size)->cdata($name); 
     49        $svg->text(x => $ox + 35, y => $oy + 75, style => { 'font-family' => $font, 'color' => 'black', 'font-size' => 11 }, 'font-family' => $font, 'font-size' => 11)->cdata(($ref->{pm_group} ? "$ref->{pm_group} / " : "") . code2country($ref->{country})); 
    5050        if ($ref->{company}) { 
    51             $svg->text(x => $ox + 35, y => $oy + 90, style => { 'font-family' => $font, color => 'black', 'font-size' => 11 })->cdata( decode_utf8($ref->{company}) ); 
     51            $svg->text(x => $ox + 35, y => $oy + 90, style => { 'font-family' => $font, color => 'black', 'font-size' => 11 }, 'font-family' => $font, 'font-size' => 11)->cdata( decode_utf8($ref->{company}) ); 
    5252        } 
    5353 
    54         my $role = $ref->{has_talk} ? 'SPEAKER' : 
    55             ($ref->{is_orga} || $ref->{is_staff}) ? 'STAFF' : ''; 
     54        my $role = ($ref->{is_orga} || $ref->{is_staff}) ? 'STAFF' :  
     55            $ref->{has_talk} ? 'SPEAKER' :''; 
    5656 
    5757        if ($role) { 
    58             $svg->text(x => $ox + 35, y => $oy + 126, style => { 'font-family' => $font, 'font-weight' => 'bold', color => 'black', 'font-size' => 16 })->cdata($role); 
     58            $svg->text(x => $ox + 35, y => $oy + 126, style => { 'font-family' => $font, 'font-weight' => 'bold', color => 'black', 'font-size' => 16 }, 'font-family' => $font, 'font-size' => 16)->cdata($role); 
    5959        } 
    6060 
    61         $svg->text(x => $ox + 266, y => $oy + 16, style => { 'font-family' => $font, color => 'black', 'font-size' => 8 })->cdata($ref->{user_id}); 
     61        $svg->text(x => $ox + 266, y => $oy + 16, style => { 'font-family' => $font, color => 'black', 'font-size' => 8 }, 'font-family' => $font, 'font-size' => 8)->cdata($ref->{user_id}); 
    6262 
    6363        $ox = $ox == 0 ? 296 : 0; 
     
    7474    my $ref = shift; 
    7575 
    76     ## xxx nickname 
     76    if ($ref->{pseudonymous}) { 
     77        return decode_utf8( $ref->{nick_name} ); 
     78    } 
     79 
    7780    if (is_cjk($ref)) { 
    7881        return decode_utf8( $ref->{last_name} . $ref->{first_name} );