| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2009 Red Hat, Inc. | 2 * Copyright © 2009 Red Hat, Inc. |
| 3 * | 3 * |
| 4 * This is part of HarfBuzz, a text shaping library. | 4 * This is part of HarfBuzz, a text shaping library. |
| 5 * | 5 * |
| 6 * Permission is hereby granted, without written agreement and without | 6 * Permission is hereby granted, without written agreement and without |
| 7 * license or royalty fees, to use, copy, modify, and distribute this | 7 * license or royalty fees, to use, copy, modify, and distribute this |
| 8 * software and its documentation for any purpose, provided that the | 8 * software and its documentation for any purpose, provided that the |
| 9 * above copyright notice and the following two paragraphs appear in | 9 * above copyright notice and the following two paragraphs appear in |
| 10 * all copies of this software. | 10 * all copies of this software. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 * Note re various memory-modes: | 40 * Note re various memory-modes: |
| 41 * | 41 * |
| 42 * - In no case shall the HarfBuzz client modify memory | 42 * - In no case shall the HarfBuzz client modify memory |
| 43 * that is passed to HarfBuzz in a blob. If there is | 43 * that is passed to HarfBuzz in a blob. If there is |
| 44 * any such possibility, MODE_DUPLICATE should be used | 44 * any such possibility, MODE_DUPLICATE should be used |
| 45 * such that HarfBuzz makes a copy immediately, | 45 * such that HarfBuzz makes a copy immediately, |
| 46 * | 46 * |
| 47 * - Use MODE_READONLY otherse, unless you really really | 47 * - Use MODE_READONLY otherse, unless you really really |
| 48 * really know what you are doing, | 48 * really know what you are doing, |
| 49 * | 49 * |
| 50 * - MODE_WRITABLE is appropriate if you relaly made a | 50 * - MODE_WRITABLE is appropriate if you really made a |
| 51 * copy of data solely for the purpose of passing to | 51 * copy of data solely for the purpose of passing to |
| 52 * HarfBuzz and doing that just once (no reuse!), | 52 * HarfBuzz and doing that just once (no reuse!), |
| 53 * | 53 * |
| 54 * - If the font is mmap()ed, it's ok to use | 54 * - If the font is mmap()ed, it's ok to use |
| 55 * READONLY_MAY_MAKE_WRITABLE, however, there were | 55 * READONLY_MAY_MAKE_WRITABLE, however, using that mode |
| 56 * design problems with that mode, so HarfBuzz do not | 56 * correctly is very tricky. Use MODE_READONLY instead. |
| 57 * really use it anymore. If not sure, use MODE_READONLY. | |
| 58 */ | 57 */ |
| 59 typedef enum { | 58 typedef enum { |
| 60 HB_MEMORY_MODE_DUPLICATE, | 59 HB_MEMORY_MODE_DUPLICATE, |
| 61 HB_MEMORY_MODE_READONLY, | 60 HB_MEMORY_MODE_READONLY, |
| 62 HB_MEMORY_MODE_WRITABLE, | 61 HB_MEMORY_MODE_WRITABLE, |
| 63 HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE | 62 HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE |
| 64 } hb_memory_mode_t; | 63 } hb_memory_mode_t; |
| 65 | 64 |
| 66 typedef struct hb_blob_t hb_blob_t; | 65 typedef struct hb_blob_t hb_blob_t; |
| 67 | 66 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 const char * | 117 const char * |
| 119 hb_blob_get_data (hb_blob_t *blob, unsigned int *length); | 118 hb_blob_get_data (hb_blob_t *blob, unsigned int *length); |
| 120 | 119 |
| 121 char * | 120 char * |
| 122 hb_blob_get_data_writable (hb_blob_t *blob, unsigned int *length); | 121 hb_blob_get_data_writable (hb_blob_t *blob, unsigned int *length); |
| 123 | 122 |
| 124 | 123 |
| 125 HB_END_DECLS | 124 HB_END_DECLS |
| 126 | 125 |
| 127 #endif /* HB_BLOB_H */ | 126 #endif /* HB_BLOB_H */ |
| OLD | NEW |