| Index: experimental/PdfViewer/SkPdfFont.cpp
|
| ===================================================================
|
| --- experimental/PdfViewer/SkPdfFont.cpp (revision 9962)
|
| +++ experimental/PdfViewer/SkPdfFont.cpp (working copy)
|
| @@ -11,83 +11,83 @@
|
| // TODO (edisonn): , vs - ? what does it mean?
|
| // TODO (edisonn): MT, PS, Oblique=italic?, ... what does it mean?
|
| if (gPdfStandardFonts.empty()) {
|
| - gPdfStandardFonts["Arial"] = {"Arial", false, false};
|
| - gPdfStandardFonts["Arial,Bold"] = {"Arial", true, false};
|
| - gPdfStandardFonts["Arial,BoldItalic"] = {"Arial", true, true};
|
| - gPdfStandardFonts["Arial,Italic"] = {"Arial", false, true};
|
| - gPdfStandardFonts["Arial-Bold"] = {"Arial", true, false};
|
| - gPdfStandardFonts["Arial-BoldItalic"] = {"Arial", true, true};
|
| - gPdfStandardFonts["Arial-BoldItalicMT"] = {"Arial", true, true};
|
| - gPdfStandardFonts["Arial-BoldMT"] = {"Arial", true, false};
|
| - gPdfStandardFonts["Arial-Italic"] = {"Arial", false, true};
|
| - gPdfStandardFonts["Arial-ItalicMT"] = {"Arial", false, true};
|
| - gPdfStandardFonts["ArialMT"] = {"Arial", false, false};
|
| - gPdfStandardFonts["Courier"] = {"Courier New", false, false};
|
| - gPdfStandardFonts["Courier,Bold"] = {"Courier New", true, false};
|
| - gPdfStandardFonts["Courier,BoldItalic"] = {"Courier New", true, true};
|
| - gPdfStandardFonts["Courier,Italic"] = {"Courier New", false, true};
|
| - gPdfStandardFonts["Courier-Bold"] = {"Courier New", true, false};
|
| - gPdfStandardFonts["Courier-BoldOblique"] = {"Courier New", true, true};
|
| - gPdfStandardFonts["Courier-Oblique"] = {"Courier New", false, true};
|
| - gPdfStandardFonts["CourierNew"] = {"Courier New", false, false};
|
| - gPdfStandardFonts["CourierNew,Bold"] = {"Courier New", true, false};
|
| - gPdfStandardFonts["CourierNew,BoldItalic"] = {"Courier New", true, true};
|
| - gPdfStandardFonts["CourierNew,Italic"] = {"Courier New", false, true};
|
| - gPdfStandardFonts["CourierNew-Bold"] = {"Courier New", true, false};
|
| - gPdfStandardFonts["CourierNew-BoldItalic"] = {"Courier New", true, true};
|
| - gPdfStandardFonts["CourierNew-Italic"] = {"Courier New", false, true};
|
| - gPdfStandardFonts["CourierNewPS-BoldItalicMT"] = {"Courier New", true, true};
|
| - gPdfStandardFonts["CourierNewPS-BoldMT"] = {"Courier New", true, false};
|
| - gPdfStandardFonts["CourierNewPS-ItalicMT"] = {"Courier New", false, true};
|
| - gPdfStandardFonts["CourierNewPSMT"] = {"Courier New", false, false};
|
| - gPdfStandardFonts["Helvetica"] = {"Helvetica", false, false};
|
| - gPdfStandardFonts["Helvetica,Bold"] = {"Helvetica", true, false};
|
| - gPdfStandardFonts["Helvetica,BoldItalic"] = {"Helvetica", true, true};
|
| - gPdfStandardFonts["Helvetica,Italic"] = {"Helvetica", false, true};
|
| - gPdfStandardFonts["Helvetica-Bold"] = {"Helvetica", true, false};
|
| - gPdfStandardFonts["Helvetica-BoldItalic"] = {"Helvetica", true, true};
|
| - gPdfStandardFonts["Helvetica-BoldOblique"] = {"Helvetica", true, true};
|
| - gPdfStandardFonts["Helvetica-Italic"] = {"Helvetica", false, true};
|
| - gPdfStandardFonts["Helvetica-Oblique"] = {"Helvetica", false, true};
|
| - gPdfStandardFonts["Times-Bold"] = {"Times New Roman", true, false};
|
| - gPdfStandardFonts["Times-BoldItalic"] = {"Times New Roman", true, true};
|
| - gPdfStandardFonts["Times-Italic"] = {"Times New Roman", false, true};
|
| - gPdfStandardFonts["Times-Roman"] = {"Times New Roman", false, false};
|
| - gPdfStandardFonts["TimesNewRoman"] = {"Times New Roman", false, false};
|
| - gPdfStandardFonts["TimesNewRoman,Bold"] = {"Times New Roman", true, false};
|
| - gPdfStandardFonts["TimesNewRoman,BoldItalic"] = {"Times New Roman", true, true};
|
| - gPdfStandardFonts["TimesNewRoman,Italic"] = {"Times New Roman", false, true};
|
| - gPdfStandardFonts["TimesNewRoman-Bold"] = {"Times New Roman", true, false};
|
| - gPdfStandardFonts["TimesNewRoman-BoldItalic"] = {"Times New Roman", true, true};
|
| - gPdfStandardFonts["TimesNewRoman-Italic"] = {"Times New Roman", false, true};
|
| - gPdfStandardFonts["TimesNewRomanPS"] = {"Times New Roman", false, false};
|
| - gPdfStandardFonts["TimesNewRomanPS-Bold"] = {"Times New Roman", true, false};
|
| - gPdfStandardFonts["TimesNewRomanPS-BoldItalic"] = {"Times New Roman", true, true};
|
| - gPdfStandardFonts["TimesNewRomanPS-BoldItalicMT"] = {"Times New Roman", true, true};
|
| - gPdfStandardFonts["TimesNewRomanPS-BoldMT"] = {"Times New Roman", true, false};
|
| - gPdfStandardFonts["TimesNewRomanPS-Italic"] = {"Times New Roman", false, true};
|
| - gPdfStandardFonts["TimesNewRomanPS-ItalicMT"] = {"Times New Roman", false, true};
|
| - gPdfStandardFonts["TimesNewRomanPSMT"] = {"Times New Roman", false, false};
|
| - gPdfStandardFonts["Symbol"] = {"Symbol", false, false};
|
| - gPdfStandardFonts["ZapfDingbats"] = {"ZapfDingbats", false, false};
|
| + gPdfStandardFonts["Arial"] = SkPdfStandardFontEntry("Arial", false, false);
|
| + gPdfStandardFonts["Arial,Bold"] = SkPdfStandardFontEntry("Arial", true, false);
|
| + gPdfStandardFonts["Arial,BoldItalic"] = SkPdfStandardFontEntry("Arial", true, true);
|
| + gPdfStandardFonts["Arial,Italic"] = SkPdfStandardFontEntry("Arial", false, true);
|
| + gPdfStandardFonts["Arial-Bold"] = SkPdfStandardFontEntry("Arial", true, false);
|
| + gPdfStandardFonts["Arial-BoldItalic"] = SkPdfStandardFontEntry("Arial", true, true);
|
| + gPdfStandardFonts["Arial-BoldItalicMT"] = SkPdfStandardFontEntry("Arial", true, true);
|
| + gPdfStandardFonts["Arial-BoldMT"] = SkPdfStandardFontEntry("Arial", true, false);
|
| + gPdfStandardFonts["Arial-Italic"] = SkPdfStandardFontEntry("Arial", false, true);
|
| + gPdfStandardFonts["Arial-ItalicMT"] = SkPdfStandardFontEntry("Arial", false, true);
|
| + gPdfStandardFonts["ArialMT"] = SkPdfStandardFontEntry("Arial", false, false);
|
| + gPdfStandardFonts["Courier"] = SkPdfStandardFontEntry("Courier New", false, false);
|
| + gPdfStandardFonts["Courier,Bold"] = SkPdfStandardFontEntry("Courier New", true, false);
|
| + gPdfStandardFonts["Courier,BoldItalic"] = SkPdfStandardFontEntry("Courier New", true, true);
|
| + gPdfStandardFonts["Courier,Italic"] = SkPdfStandardFontEntry("Courier New", false, true);
|
| + gPdfStandardFonts["Courier-Bold"] = SkPdfStandardFontEntry("Courier New", true, false);
|
| + gPdfStandardFonts["Courier-BoldOblique"] = SkPdfStandardFontEntry("Courier New", true, true);
|
| + gPdfStandardFonts["Courier-Oblique"] = SkPdfStandardFontEntry("Courier New", false, true);
|
| + gPdfStandardFonts["CourierNew"] = SkPdfStandardFontEntry("Courier New", false, false);
|
| + gPdfStandardFonts["CourierNew,Bold"] = SkPdfStandardFontEntry("Courier New", true, false);
|
| + gPdfStandardFonts["CourierNew,BoldItalic"] = SkPdfStandardFontEntry("Courier New", true, true);
|
| + gPdfStandardFonts["CourierNew,Italic"] = SkPdfStandardFontEntry("Courier New", false, true);
|
| + gPdfStandardFonts["CourierNew-Bold"] = SkPdfStandardFontEntry("Courier New", true, false);
|
| + gPdfStandardFonts["CourierNew-BoldItalic"] = SkPdfStandardFontEntry("Courier New", true, true);
|
| + gPdfStandardFonts["CourierNew-Italic"] = SkPdfStandardFontEntry("Courier New", false, true);
|
| + gPdfStandardFonts["CourierNewPS-BoldItalicMT"] = SkPdfStandardFontEntry("Courier New", true, true);
|
| + gPdfStandardFonts["CourierNewPS-BoldMT"] = SkPdfStandardFontEntry("Courier New", true, false);
|
| + gPdfStandardFonts["CourierNewPS-ItalicMT"] = SkPdfStandardFontEntry("Courier New", false, true);
|
| + gPdfStandardFonts["CourierNewPSMT"] = SkPdfStandardFontEntry("Courier New", false, false);
|
| + gPdfStandardFonts["Helvetica"] = SkPdfStandardFontEntry("Helvetica", false, false);
|
| + gPdfStandardFonts["Helvetica,Bold"] = SkPdfStandardFontEntry("Helvetica", true, false);
|
| + gPdfStandardFonts["Helvetica,BoldItalic"] = SkPdfStandardFontEntry("Helvetica", true, true);
|
| + gPdfStandardFonts["Helvetica,Italic"] = SkPdfStandardFontEntry("Helvetica", false, true);
|
| + gPdfStandardFonts["Helvetica-Bold"] = SkPdfStandardFontEntry("Helvetica", true, false);
|
| + gPdfStandardFonts["Helvetica-BoldItalic"] = SkPdfStandardFontEntry("Helvetica", true, true);
|
| + gPdfStandardFonts["Helvetica-BoldOblique"] = SkPdfStandardFontEntry("Helvetica", true, true);
|
| + gPdfStandardFonts["Helvetica-Italic"] = SkPdfStandardFontEntry("Helvetica", false, true);
|
| + gPdfStandardFonts["Helvetica-Oblique"] = SkPdfStandardFontEntry("Helvetica", false, true);
|
| + gPdfStandardFonts["Times-Bold"] = SkPdfStandardFontEntry("Times New Roman", true, false);
|
| + gPdfStandardFonts["Times-BoldItalic"] = SkPdfStandardFontEntry("Times New Roman", true, true);
|
| + gPdfStandardFonts["Times-Italic"] = SkPdfStandardFontEntry("Times New Roman", false, true);
|
| + gPdfStandardFonts["Times-Roman"] = SkPdfStandardFontEntry("Times New Roman", false, false);
|
| + gPdfStandardFonts["TimesNewRoman"] = SkPdfStandardFontEntry("Times New Roman", false, false);
|
| + gPdfStandardFonts["TimesNewRoman,Bold"] = SkPdfStandardFontEntry("Times New Roman", true, false);
|
| + gPdfStandardFonts["TimesNewRoman,BoldItalic"] = SkPdfStandardFontEntry("Times New Roman", true, true);
|
| + gPdfStandardFonts["TimesNewRoman,Italic"] = SkPdfStandardFontEntry("Times New Roman", false, true);
|
| + gPdfStandardFonts["TimesNewRoman-Bold"] = SkPdfStandardFontEntry("Times New Roman", true, false);
|
| + gPdfStandardFonts["TimesNewRoman-BoldItalic"] = SkPdfStandardFontEntry("Times New Roman", true, true);
|
| + gPdfStandardFonts["TimesNewRoman-Italic"] = SkPdfStandardFontEntry("Times New Roman", false, true);
|
| + gPdfStandardFonts["TimesNewRomanPS"] = SkPdfStandardFontEntry("Times New Roman", false, false);
|
| + gPdfStandardFonts["TimesNewRomanPS-Bold"] = SkPdfStandardFontEntry("Times New Roman", true, false);
|
| + gPdfStandardFonts["TimesNewRomanPS-BoldItalic"] = SkPdfStandardFontEntry("Times New Roman", true, true);
|
| + gPdfStandardFonts["TimesNewRomanPS-BoldItalicMT"] = SkPdfStandardFontEntry("Times New Roman", true, true);
|
| + gPdfStandardFonts["TimesNewRomanPS-BoldMT"] = SkPdfStandardFontEntry("Times New Roman", true, false);
|
| + gPdfStandardFonts["TimesNewRomanPS-Italic"] = SkPdfStandardFontEntry("Times New Roman", false, true);
|
| + gPdfStandardFonts["TimesNewRomanPS-ItalicMT"] = SkPdfStandardFontEntry("Times New Roman", false, true);
|
| + gPdfStandardFonts["TimesNewRomanPSMT"] = SkPdfStandardFontEntry("Times New Roman", false, false);
|
| + gPdfStandardFonts["Symbol"] = SkPdfStandardFontEntry("Symbol", false, false);
|
| + gPdfStandardFonts["ZapfDingbats"] = SkPdfStandardFontEntry("ZapfDingbats", false, false);
|
|
|
| // TODO(edisonn): these are hacks. Load Post Script font name.
|
| // see FT_Get_Postscript_Name
|
| // Font config is not using it, yet.
|
| //https://bugs.freedesktop.org/show_bug.cgi?id=18095
|
|
|
| - gPdfStandardFonts["Arial-Black"] = {"Arial", true, false};
|
| - gPdfStandardFonts["DejaVuSans"] = {"DejaVu Sans", false, false};
|
| - gPdfStandardFonts["DejaVuSansMono"] = {"DejaVuSans Mono", false, false};
|
| - gPdfStandardFonts["DejaVuSansMono-Bold"] = {"DejaVuSans Mono", true, false};
|
| - gPdfStandardFonts["DejaVuSansMono-Oblique"] = {"DejaVuSans Mono", false, true};
|
| - gPdfStandardFonts["Georgia-Bold"] = {"Georgia", true, false};
|
| - gPdfStandardFonts["Georgia-BoldItalic"] = {"Georgia", true, true};
|
| - gPdfStandardFonts["Georgia-Italic"] = {"Georgia", false, true};
|
| - gPdfStandardFonts["TrebuchetMS"] = {"Trebuchet MS", false, false};
|
| - gPdfStandardFonts["TrebuchetMS-Bold"] = {"Trebuchet MS", true, false};
|
| - gPdfStandardFonts["Verdana-Bold"] = {"Verdana", true, false};
|
| - gPdfStandardFonts["WenQuanYiMicroHei"] = {"WenQuanYi Micro Hei", false, false};
|
| + gPdfStandardFonts["Arial-Black"] = SkPdfStandardFontEntry("Arial", true, false);
|
| + gPdfStandardFonts["DejaVuSans"] = SkPdfStandardFontEntry("DejaVu Sans", false, false);
|
| + gPdfStandardFonts["DejaVuSansMono"] = SkPdfStandardFontEntry("DejaVuSans Mono", false, false);
|
| + gPdfStandardFonts["DejaVuSansMono-Bold"] = SkPdfStandardFontEntry("DejaVuSans Mono", true, false);
|
| + gPdfStandardFonts["DejaVuSansMono-Oblique"] = SkPdfStandardFontEntry("DejaVuSans Mono", false, true);
|
| + gPdfStandardFonts["Georgia-Bold"] = SkPdfStandardFontEntry("Georgia", true, false);
|
| + gPdfStandardFonts["Georgia-BoldItalic"] = SkPdfStandardFontEntry("Georgia", true, true);
|
| + gPdfStandardFonts["Georgia-Italic"] = SkPdfStandardFontEntry("Georgia", false, true);
|
| + gPdfStandardFonts["TrebuchetMS"] = SkPdfStandardFontEntry("Trebuchet MS", false, false);
|
| + gPdfStandardFonts["TrebuchetMS-Bold"] = SkPdfStandardFontEntry("Trebuchet MS", true, false);
|
| + gPdfStandardFonts["Verdana-Bold"] = SkPdfStandardFontEntry("Verdana", true, false);
|
| + gPdfStandardFonts["WenQuanYiMicroHei"] = SkPdfStandardFontEntry("WenQuanYi Micro Hei", false, false);
|
|
|
| // TODO(edisonn): list all phonts available, builf post script name as in pdf spec
|
| /*
|
|
|