| 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 * Copyright (C) 2007 Pioneer Research Center USA, Inc. | 6 * Copyright (C) 2007 Pioneer Research Center USA, Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * | 8 * |
| 9 * Redistribution and use in source and binary forms, with or without | 9 * Redistribution and use in source and binary forms, with or without |
| 10 * modification, are permitted provided that the following conditions | 10 * modification, are permitted provided that the following conditions |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 m_font.m_context = 0; | 73 m_font.m_context = 0; |
| 74 } | 74 } |
| 75 | 75 |
| 76 if (m_font.m_scaledFont) { | 76 if (m_font.m_scaledFont) { |
| 77 cairo_scaled_font_destroy(m_font.m_scaledFont); | 77 cairo_scaled_font_destroy(m_font.m_scaledFont); |
| 78 m_font.m_scaledFont = 0; | 78 m_font.m_scaledFont = 0; |
| 79 } | 79 } |
| 80 } | 80 } |
| 81 | 81 |
| 82 delete m_smallCapsFontData; | 82 delete m_smallCapsFontData; |
| 83 m_smallCapsFontData = 0; |
| 83 } | 84 } |
| 84 | 85 |
| 85 SimpleFontData* SimpleFontData::smallCapsFontData(const FontDescription& fontDes
cription) const | 86 SimpleFontData* SimpleFontData::smallCapsFontData(const FontDescription& fontDes
cription) const |
| 86 { | 87 { |
| 87 if (!m_smallCapsFontData) { | 88 if (!m_smallCapsFontData) { |
| 88 FontDescription desc = FontDescription(fontDescription); | 89 FontDescription desc = FontDescription(fontDescription); |
| 89 desc.setSpecifiedSize(0.70f*fontDescription.computedSize()); | 90 desc.setSpecifiedSize(0.70f*fontDescription.computedSize()); |
| 90 const FontPlatformData* pdata = new FontPlatformData(desc, desc.family()
.family()); | 91 const FontPlatformData* pdata = new FontPlatformData(desc, desc.family()
.family()); |
| 91 m_smallCapsFontData = new SimpleFontData(*pdata); | 92 m_smallCapsFontData = new SimpleFontData(*pdata); |
| 92 } | 93 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 return w; | 136 return w; |
| 136 } | 137 } |
| 137 | 138 |
| 138 void SimpleFontData::setFont(cairo_t* cr) const | 139 void SimpleFontData::setFont(cairo_t* cr) const |
| 139 { | 140 { |
| 140 ASSERT(cr); | 141 ASSERT(cr); |
| 141 m_font.setFont(cr); | 142 m_font.setFont(cr); |
| 142 } | 143 } |
| 143 | 144 |
| 144 } | 145 } |
| OLD | NEW |