SkOTTable_EBSC.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright 2014 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #ifndef SkOTTable_EBSC_DEFINED
  8. #define SkOTTable_EBSC_DEFINED
  9. #include "src/core/SkEndian.h"
  10. #include "src/sfnt/SkOTTableTypes.h"
  11. #include "src/sfnt/SkOTTable_EBLC.h"
  12. #pragma pack(push, 1)
  13. struct SkOTTableEmbeddedBitmapScaling {
  14. static const SK_OT_CHAR TAG0 = 'E';
  15. static const SK_OT_CHAR TAG1 = 'S';
  16. static const SK_OT_CHAR TAG2 = 'B';
  17. static const SK_OT_CHAR TAG3 = 'C';
  18. static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTableEmbeddedBitmapScaling>::value;
  19. SK_OT_Fixed version;
  20. static const SK_OT_Fixed version_initial = SkTEndian_SwapBE32(0x00020000);
  21. SK_OT_ULONG numSizes;
  22. struct BitmapScaleTable {
  23. SkOTTableEmbeddedBitmapLocation::SbitLineMetrics hori;
  24. SkOTTableEmbeddedBitmapLocation::SbitLineMetrics vert;
  25. SK_OT_BYTE ppemX; //target horizontal pixels per EM
  26. SK_OT_BYTE ppemY; //target vertical pixels per EM
  27. SK_OT_BYTE substitutePpemX; //use bitmaps of this size
  28. SK_OT_BYTE substitutePpemY; //use bitmaps of this size
  29. }; //bitmapScaleTable[numSizes];
  30. };
  31. #pragma pack(pop)
  32. #endif