• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
8 #ifndef SkOTTable_EBSC_DEFINED
9 #define SkOTTable_EBSC_DEFINED
10 
11 #include "SkEndian.h"
12 #include "SkOTTable_EBLC.h"
13 #include "SkOTTableTypes.h"
14 
15 #pragma pack(push, 1)
16 
17 struct SkOTTableEmbeddedBitmapScaling {
18     static const SK_OT_CHAR TAG0 = 'E';
19     static const SK_OT_CHAR TAG1 = 'S';
20     static const SK_OT_CHAR TAG2 = 'B';
21     static const SK_OT_CHAR TAG3 = 'C';
22     static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTableEmbeddedBitmapScaling>::value;
23 
24     SK_OT_Fixed version;
25     static const SK_OT_Fixed version_initial = SkTEndian_SwapBE32(0x00020000);
26 
27     SK_OT_ULONG numSizes;
28 
29     struct BitmapScaleTable {
30         SkOTTableEmbeddedBitmapLocation::SbitLineMetrics hori;
31         SkOTTableEmbeddedBitmapLocation::SbitLineMetrics vert;
32         SK_OT_BYTE ppemX; //target horizontal pixels per EM
33         SK_OT_BYTE ppemY; //target vertical pixels per EM
34         SK_OT_BYTE substitutePpemX; //use bitmaps of this size
35         SK_OT_BYTE substitutePpemY; //use bitmaps of this size
36     }; //bitmapScaleTable[numSizes];
37 };
38 
39 #pragma pack(pop)
40 
41 #endif
42