| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #include "SkTypes.h" | 38 #include "SkTypes.h" |
| 39 #include "SkUtils.h" | 39 #include "SkUtils.h" |
| 40 #include "platform/fonts/FontDescription.h" | 40 #include "platform/fonts/FontDescription.h" |
| 41 #include "platform/fonts/GlyphPage.h" | 41 #include "platform/fonts/GlyphPage.h" |
| 42 #include "platform/fonts/VDMXParser.h" | 42 #include "platform/fonts/VDMXParser.h" |
| 43 #include "platform/geometry/FloatRect.h" | 43 #include "platform/geometry/FloatRect.h" |
| 44 #include "wtf/unicode/Unicode.h" | 44 #include "wtf/unicode/Unicode.h" |
| 45 | 45 |
| 46 namespace blink { | 46 namespace blink { |
| 47 | 47 |
| 48 #if OS(LINUX) || OS(ANDROID) |
| 48 // This is the largest VDMX table which we'll try to load and parse. | 49 // This is the largest VDMX table which we'll try to load and parse. |
| 49 static const size_t maxVDMXTableSize = 1024 * 1024; // 1 MB | 50 static const size_t maxVDMXTableSize = 1024 * 1024; // 1 MB |
| 51 #endif |
| 50 | 52 |
| 51 void SimpleFontData::platformInit() | 53 void SimpleFontData::platformInit() |
| 52 { | 54 { |
| 53 if (!m_platformData.size()) { | 55 if (!m_platformData.size()) { |
| 54 m_fontMetrics.reset(); | 56 m_fontMetrics.reset(); |
| 55 m_avgCharWidth = 0; | 57 m_avgCharWidth = 0; |
| 56 m_maxCharWidth = 0; | 58 m_maxCharWidth = 0; |
| 57 return; | 59 return; |
| 58 } | 60 } |
| 59 | 61 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 if (glyphs[i]) { | 298 if (glyphs[i]) { |
| 297 pageToFill->setGlyphDataForIndex(offset + i, glyphs[i], this); | 299 pageToFill->setGlyphDataForIndex(offset + i, glyphs[i], this); |
| 298 haveGlyphs = true; | 300 haveGlyphs = true; |
| 299 } | 301 } |
| 300 } | 302 } |
| 301 | 303 |
| 302 return haveGlyphs; | 304 return haveGlyphs; |
| 303 } | 305 } |
| 304 | 306 |
| 305 } // namespace blink | 307 } // namespace blink |
| OLD | NEW |