os/graphics/graphicsdeviceinterface/directgdiadaptation/hwsrc/glyphlutab.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #include <e32std.h>
    17 
    18 /**
    19 This lookup table is used for outline and shadow fonts. Four entries of this table represent 
    20 the percentage of Outline, Shadow, Fill and Background colour to be used to get the final colour to be 
    21 displayed on screen.
    22 
    23 The following formula is used to blend four colours:
    24 
    25 blendedXXXColor = (XXXOutlinePenColor * FourColorBlendLookup[index][KOutlineColorIndex] + 
    26 			   		XXXShadowColor * FourColorBlendLookup[index][KShadowColorIndex] +
    27 			  		XXXFillColor * FourColorBlendLookup[index][KFillColorIndex] + 
    28 			  		backgroundColor.XXX() * FourColorBlendLookup[index][KBackgroundColorIndex]) >> 8;
    29 where XXX can be Red, Green or Blue
    30 and index is the 8-bit value which will be provided by the rasterizer to decide which 
    31 entry of lookup table should be used. Right shift by eight will divide the calculated value in % with 
    32 256 to get the actual colour.
    33 
    34 This table is provided by Monotype and MUST NOT be changed.
    35 */
    36 extern const TInt FourColorBlendLookup[256][4] = {
    37 	{ 0, 0, 0, 255 },
    38 	{ 0, 0, 17, 238 },
    39 	{ 0, 0, 34, 221 },
    40 	{ 0, 0, 51, 204 },
    41 	{ 0, 0, 68, 187 },
    42 	{ 0, 0, 85, 170 },
    43 	{ 0, 0, 102, 153 },
    44 	{ 0, 0, 119, 136 },
    45 	{ 0, 0, 136, 119 },
    46 	{ 0, 0, 153, 102 },
    47 	{ 0, 0, 170, 85 },
    48 	{ 0, 0, 187, 68 },
    49 	{ 0, 0, 204, 51 },
    50 	{ 0, 0, 221, 34 },
    51 	{ 0, 0, 238, 17 },
    52 	{ 0, 0, 255, 0 },
    53 	{ 0, 17, 0, 238 },
    54 	{ 0, 34, 0, 221 },
    55 	{ 0, 51, 0, 204 },
    56 	{ 0, 68, 0, 187 },
    57 	{ 0, 85, 0, 170 },
    58 	{ 0, 102, 0, 153 },
    59 	{ 0, 119, 0, 136 },
    60 	{ 0, 136, 0, 119 },
    61 	{ 0, 153, 0, 102 },
    62 	{ 0, 170, 0, 85 },
    63 	{ 0, 187, 0, 68 },
    64 	{ 0, 204, 0, 51 },
    65 	{ 0, 221, 0, 34 },
    66 	{ 0, 238, 0, 17 },
    67 	{ 0, 255, 0, 0 },
    68 	{ 17, 0, 0, 238 },
    69 	{ 34, 0, 0, 221 },
    70 	{ 51, 0, 0, 204 },
    71 	{ 68, 0, 0, 187 },
    72 	{ 85, 0, 0, 170 },
    73 	{ 102, 0, 0, 153 },
    74 	{ 119, 0, 0, 136 },
    75 	{ 136, 0, 0, 119 },
    76 	{ 153, 0, 0, 102 },
    77 	{ 170, 0, 0, 85 },
    78 	{ 187, 0, 0, 68 },
    79 	{ 204, 0, 0, 51 },
    80 	{ 221, 0, 0, 34 },
    81 	{ 238, 0, 0, 17 },
    82 	{ 255, 0, 0, 0 },
    83 	{ 0, 17, 238, 0 },
    84 	{ 0, 34, 221, 0 },
    85 	{ 0, 51, 204, 0 },
    86 	{ 0, 68, 187, 0 },
    87 	{ 0, 85, 170, 0 },
    88 	{ 0, 102, 153, 0 },
    89 	{ 0, 119, 136, 0 },
    90 	{ 0, 136, 119, 0 },
    91 	{ 0, 153, 102, 0 },
    92 	{ 0, 170, 85 ,0 },
    93 	{ 0, 187, 68 ,0 },
    94 	{ 0, 204, 51, 0 },
    95 	{ 0, 221, 34, 0 },
    96 	{ 0, 238, 17, 0 },
    97 	{ 238, 17, 0, 0 },
    98 	{ 221, 34, 0, 0 },
    99 	{ 204, 51, 0, 0 },
   100 	{ 187, 68, 0, 0 },
   101 	{ 170, 85, 0, 0 },
   102 	{ 153, 102, 0, 0 },
   103 	{ 136, 119, 0, 0 },
   104 	{ 119, 136, 0, 0 },
   105 	{ 102, 153, 0, 0 },
   106 	{ 85, 170, 0, 0 },
   107 	{ 68, 187, 0, 0 },
   108 	{ 51, 204, 0, 0 },
   109 	{ 34, 221, 0, 0 },
   110 	{ 17, 238, 0, 0 },
   111 	{ 238, 0, 17, 0 },
   112 	{ 221, 0, 34, 0 }, 
   113 	{ 204, 0, 51, 0 },
   114 	{ 187, 0, 68, 0 },
   115 	{ 170, 0, 85, 0 },
   116 	{ 153, 0, 102, 0 },
   117 	{ 136, 0, 119, 0 },
   118 	{ 119, 0, 136, 0 }, 
   119 	{ 102, 0, 153, 0 }, 
   120 	{ 85, 0, 170, 0 } ,
   121 	{ 68, 0, 187, 0 },
   122 	{ 51, 0, 204, 0 }, 
   123 	{ 34, 0, 221, 0 }, 
   124 	{ 17, 0, 238, 0 }, 
   125 	{ 210, 23, 0, 22 }, 
   126 	{ 179, 60, 0, 16 }, 
   127 	{ 145, 94, 0, 16 }, 
   128 	{ 119, 119, 0, 17 }, 
   129 	{ 94, 145, 0, 16 }, 
   130 	{ 60, 179, 0, 16 }, 
   131 	{ 23, 210, 0, 22 }, 
   132 	{ 176, 40, 0, 39 }, 
   133 	{ 142, 74, 0, 39 }, 
   134 	{ 113, 96, 0, 46 }, 
   135 	{ 91, 125, 0, 39 }, 
   136 	{ 62, 147, 0, 46 }, 
   137 	{ 40, 176, 0, 39 }, 
   138 	{ 179, 17, 0, 59 },
   139 	{ 147, 45, 0, 63 },
   140 	{ 17, 179, 0, 59 },
   141 	{ 145, 17, 0, 93 },
   142 	{ 125, 40, 0, 90 },
   143 	{ 108, 74, 0, 73 },
   144 	{ 74, 108, 0, 73 },
   145 	{ 85, 85, 0, 85 },
   146 	{ 40, 142, 0, 73 },
   147 	{ 119, 17, 0, 119 },
   148 	{ 96, 45, 0, 114 },
   149 	{ 74, 74, 0, 107 },
   150 	{ 45, 113, 0, 97 },
   151 	{ 17, 145, 0, 93 },
   152 	{ 94, 17, 0, 144 },
   153 	{ 74, 40, 0, 141 },
   154 	{ 45, 62, 0, 148 },
   155 	{ 40, 91, 0, 124 },
   156 	{ 17, 119, 0, 119 },
   157 	{ 17, 94, 0, 144 }, 
   158 	{ 60, 17, 0, 178 }, 
   159 	{ 40, 40, 0, 175 }, 
   160 	{ 17, 60, 0, 178 }, 
   161 	{ 23, 23, 0, 209 }, 
   162 	{ 0, 210, 23, 22 },
   163 	{ 0, 179, 60, 16 },
   164 	{ 0, 145, 94, 16 },
   165 	{ 0, 119, 119, 17 },
   166 	{ 0, 94 ,145, 16 },
   167 	{ 0, 60 ,179, 16 },
   168 	{ 0, 23, 210, 22 },
   169 	{ 0, 176, 40, 39 },
   170 	{ 0, 142, 74, 39 },
   171 	{ 0, 113, 96, 46 },
   172 	{ 0, 91, 125, 39 },
   173 	{ 0, 62, 147, 46 },
   174 	{ 0, 40, 176, 39 },
   175 	{ 0, 179, 17, 59 },
   176 	{ 0, 147, 45, 63 },
   177 	{ 0, 17, 179, 59 },
   178 	{ 0, 145, 17, 93 },
   179 	{ 0, 125, 40, 90 },
   180 	{ 0, 108, 74, 73 },
   181 	{ 0, 74, 108, 73 },
   182 	{ 0, 85, 85, 85 },
   183 	{ 0, 40, 142, 73 }, 
   184 	{ 0, 119, 17, 119 },
   185 	{ 0, 96, 45, 114 },
   186 	{ 0, 74, 74, 107 },
   187 	{ 0, 45, 113, 97 },
   188 	{ 0, 17, 145, 93 },
   189 	{ 0, 94, 17, 144 },
   190 	{ 0, 74, 40, 141 },
   191 	{ 0, 45, 62, 148 },
   192 	{ 0, 40, 91, 124 },
   193 	{ 0, 17, 119, 119 },
   194 	{ 0, 17, 94, 144 },
   195 	{ 0, 60, 17, 178 },
   196 	{ 0, 40, 40, 175 },
   197 	{ 0, 17, 60, 178 },
   198 	{ 0, 23, 23, 209 },
   199 	{ 23, 0, 210, 22 },
   200 	{ 60, 0, 179, 16 },
   201 	{ 94, 0, 145, 16 },
   202 	{ 119, 0, 119, 17 },
   203 	{ 145, 0, 94, 16 },
   204 	{ 179, 0, 60, 16 },
   205 	{ 210, 0, 23, 22 },
   206 	{ 40, 0, 176, 39 },
   207 	{ 74, 0, 142, 39 },
   208 	{ 96, 0, 113, 46 },
   209 	{ 125, 0, 91, 39 },
   210 	{ 147, 0, 62, 46 },
   211 	{ 176, 0, 40, 39 },
   212 	{ 17, 0, 179, 59 },
   213 	{ 45, 0, 147, 63 },
   214 	{ 179, 0, 17, 59 },
   215 	{ 17, 0, 145, 93 },
   216 	{ 40, 0, 125, 90 },
   217 	{ 74, 0, 108, 73 },
   218 	{ 108, 0, 74, 73 },
   219 	{ 85, 0, 85, 85 },
   220 	{ 142, 0, 40, 73 },
   221 	{ 17, 0, 119, 119 },
   222 	{ 45, 0, 96, 114 },
   223 	{ 74, 0, 74, 107 },
   224 	{ 113, 0, 45, 97 },
   225 	{ 145, 0, 17, 93 },
   226 	{ 17, 0, 94, 144 },
   227 	{ 40, 0, 74, 141 },
   228 	{ 62, 0, 45, 148 },
   229 	{ 91, 0, 40, 124 },
   230 	{ 119, 0, 17, 119 },
   231 	{ 94, 0, 17, 144 },
   232 	{ 17, 0, 60, 178 },
   233 	{ 40, 0, 40, 175 },
   234 	{ 60, 0, 17, 178 },
   235 	{ 23, 0, 23, 209 },
   236 	{ 209, 23, 23, 0 },
   237 	{ 178, 17, 60, 0 },
   238 	{ 144, 17, 94, 0 },
   239 	{ 119, 17, 119, 0 },
   240 	{ 93, 17, 145, 0 },
   241 	{ 59, 17, 179, 0 },
   242 	{ 22, 23, 210, 0 },
   243 	{ 175, 40, 40, 0 },
   244 	{ 141, 40, 74, 0 },
   245 	{ 114, 45, 96, 0 },
   246 	{ 90, 40, 125, 0 },
   247 	{ 63, 45, 147, 0 },
   248 	{ 39, 40, 176, 0 },
   249 	{ 178, 60, 17, 0 },
   250 	{ 148, 62, 45, 0 },
   251 	{ 16, 60, 179, 0 },
   252 	{ 144, 94, 17, 0 },
   253 	{ 124, 91, 40, 0 },
   254 	{ 107, 74, 74, 0 },
   255 	{ 73, 74, 108, 0 },
   256 	{ 85, 85, 85, 0 },
   257 	{ 39, 74, 142, 0 }, 
   258 	{ 119, 119, 17, 0 },
   259 	{ 97, 113, 45, 0 },
   260 	{ 73, 108, 74, 0 },
   261 	{ 46, 96, 113, 0 },
   262 	{ 16, 94, 145, 0 },
   263 	{ 93, 145, 17, 0 },
   264 	{ 73, 142, 40, 0 },
   265 	{ 46, 147, 62, 0 },
   266 	{ 39, 125, 91, 0 },
   267 	{ 17, 119, 119, 0 },
   268 	{ 16, 145, 94, 0 },
   269 	{ 59, 179, 17, 0 },
   270 	{ 39, 176, 40, 0 },
   271 	{ 16, 179, 60, 0 },
   272 	{ 22, 210, 23, 0 },
   273 	{ 32, 32 ,32, 159 },
   274 	{ 32, 32 ,74, 117 },
   275 	{ 32, 32 ,116, 75 },
   276 	{ 32, 32 ,158, 33 },
   277 	{ 74, 32, 32, 117 },
   278 	{ 74, 32, 74, 75 }, 
   279 	{ 74, 32, 116, 33 },
   280 	{ 116, 32, 32, 75 },
   281 	{ 116, 32, 74, 33 },
   282 	{ 158, 32, 32, 33 },
   283 	{ 32, 74, 32, 117 },
   284 	{ 32, 74, 74, 75 },
   285 	{ 32, 74, 116, 33 },
   286 	{ 74, 74, 32, 75 },
   287 	{ 74, 74, 74, 33 },
   288 	{ 116, 74, 32, 33 },
   289 	{ 32, 116, 32, 75 },
   290 	{ 32, 116, 74, 33 },
   291 	{ 74, 116, 32, 33 },
   292 	{ 32, 158, 32, 33 },
   293 	};