Ignore:
Timestamp:
Jul 5, 2006, 5:45:07 PM (15 years ago)
Author:
Eugene Romanenko
Message:

fontconfig replacement fixes, removed wrong text in file headers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/poppler/fc-emulate-os2/fontconfig/fontconfig.cpp

    r58 r71  
    1414 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1515 *  GNU General Public License for more details.
    16  *
    17  *  You should have received a copy of the GNU General Public License
    18  *  along with gtk-gnutella; if not, write to the Free Software
    19  *  Foundation, Inc.:
    20  *      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    2116 *----------------------------------------------------------------------
    2217 */
     
    5146    strcpy( temp, s );
    5247    return temp;
     48}
     49
     50static string rtrim( const char *p )
     51{
     52    size_t len = strlen( p );
     53    char *temp = new char[ len + 1 ];
     54    strcpy( temp, p );
     55
     56    for ( int i = len - 1; i >= 0; i-- )
     57    {
     58        if ( isspace( temp[ i ] ) ) {
     59            temp[ i ] = 0;
     60        }
     61        else {
     62            break;
     63        }
     64    }
     65    string r = temp;
     66    delete temp;
     67    return r;
    5368}
    5469
     
    196211        FcfRecord r = (*fcfmap)[ fn ];
    197212        if ( ( r.size == st.st_size ) && ( r.modified == st.st_mtime ) ) {
    198             familyName = r.family;
    199             styleName = r.style;
     213            familyName = rtrim( r.family );
     214            styleName = rtrim( r.style );
    200215        }
    201216        else {
     
    214229        }
    215230
    216         familyName = ftface->family_name;
    217         styleName = ftface->style_name;
     231        familyName = rtrim( ftface->family_name );
     232        styleName = rtrim( ftface->style_name );
    218233
    219234        FT_Done_Face( ftface );
Note: See TracChangeset for help on using the changeset viewer.