| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
| 3 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com | 3 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com |
| 4 * Copyright (C) 2007, 2008 Alp Toker <alp@atoker.com> | 4 * Copyright (C) 2007, 2008 Alp Toker <alp@atoker.com> |
| 5 * Copyright (C) 2007 Holger Hans Peter Freyther | 5 * Copyright (C) 2007 Holger Hans Peter Freyther |
| 6 * All rights reserved. | 6 * All rights reserved. |
| 7 * | 7 * |
| 8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
| 9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
| 10 * are met: | 10 * are met: |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 cairo_scaled_font_text_extents(m_font.m_scaledFont, "x", &text_extents); | 56 cairo_scaled_font_text_extents(m_font.m_scaledFont, "x", &text_extents); |
| 57 m_xHeight = text_extents.height; | 57 m_xHeight = text_extents.height; |
| 58 cairo_scaled_font_text_extents(m_font.m_scaledFont, " ", &text_extents); | 58 cairo_scaled_font_text_extents(m_font.m_scaledFont, " ", &text_extents); |
| 59 m_spaceWidth = static_cast<int>(text_extents.x_advance); | 59 m_spaceWidth = static_cast<int>(text_extents.x_advance); |
| 60 m_lineGap = m_lineSpacing - m_ascent - m_descent; | 60 m_lineGap = m_lineSpacing - m_ascent - m_descent; |
| 61 } | 61 } |
| 62 | 62 |
| 63 void SimpleFontData::platformDestroy() | 63 void SimpleFontData::platformDestroy() |
| 64 { | 64 { |
| 65 delete m_smallCapsFontData; | 65 delete m_smallCapsFontData; |
| 66 m_smallCapsFontData = 0; |
| 66 | 67 |
| 67 if (isCustomFont()) | 68 if (isCustomFont()) |
| 68 return; | 69 return; |
| 69 | 70 |
| 70 if (m_font.m_pattern && ((FcPattern*)-1 != m_font.m_pattern)) { | 71 if (m_font.m_pattern && ((FcPattern*)-1 != m_font.m_pattern)) { |
| 71 FcPatternDestroy(m_font.m_pattern); | 72 FcPatternDestroy(m_font.m_pattern); |
| 72 m_font.m_pattern = 0; | 73 m_font.m_pattern = 0; |
| 73 } | 74 } |
| 74 | 75 |
| 75 if (m_font.m_fallbacks) { | 76 if (m_font.m_fallbacks) { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 return w; | 133 return w; |
| 133 } | 134 } |
| 134 | 135 |
| 135 void SimpleFontData::setFont(cairo_t* cr) const | 136 void SimpleFontData::setFont(cairo_t* cr) const |
| 136 { | 137 { |
| 137 ASSERT(cr); | 138 ASSERT(cr); |
| 138 m_font.setFont(cr); | 139 m_font.setFont(cr); |
| 139 } | 140 } |
| 140 | 141 |
| 141 } | 142 } |
| OLD | NEW |