diff options
author | Jonathan Kew <jfkthame@googlemail.com> | 2008-05-21 13:43:19 +0000 |
---|---|---|
committer | Jonathan Kew <jfkthame@googlemail.com> | 2008-05-21 13:43:19 +0000 |
commit | 455a8e9c0b4d9927d212514a5b77bd90cd5b8627 (patch) | |
tree | fb733b2fc4657d24629fe63696ca0185c916e4d3 /Build/source/texk/web2c | |
parent | ebdcfba2fc6c9bf4db2008a00058f3422a9d1da8 (diff) |
xetex update, now 0.998.5-dev (xetex svn r.689)
git-svn-id: svn://tug.org/texlive/trunk@8273 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r-- | Build/source/texk/web2c/xetexdir/XeTeX_ext.c | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/XeTeX_mac.c | 13 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/pdfimage.cpp | 9 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/xetex.ch | 25 |
4 files changed, 34 insertions, 19 deletions
diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c index 95809f999f2..f0227ec52c7 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c +++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c @@ -636,9 +636,13 @@ load_mapping_file(const char* s, const char* e, char byteMapping) &cnv); free(mapping); } + if (cnv == NULL) + fontmappingwarning(buffer, strlen(buffer), 2); /* not loadable */ + else if (gettracingfontsstate() > 1) + fontmappingwarning(buffer, strlen(buffer), 0); /* tracing */ } else - fontmappingwarning(buffer, strlen(buffer)); + fontmappingwarning(buffer, strlen(buffer), 1); /* not found */ free(buffer); diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_mac.c b/Build/source/texk/web2c/xetexdir/XeTeX_mac.c index e9a728ecb85..4efd42fee39 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeX_mac.c +++ b/Build/source/texk/web2c/xetexdir/XeTeX_mac.c @@ -925,6 +925,7 @@ countpdffilepages() int find_pic_file(char** path, realrect* bounds, int pdfBoxType, int page) + /* returns bounds in TeX points */ { *path = NULL; @@ -998,10 +999,10 @@ find_pic_file(char** path, realrect* bounds, int pdfBoxType, int page) r = CGPDFPageGetBoxRect(pageRef, boxType); } - bounds->x = r.origin.x; - bounds->y = r.origin.y; - bounds->wd = r.size.width; - bounds->ht = r.size.height; + bounds->x = r.origin.x * 72.27 / 72.0; + bounds->y = r.origin.y * 72.27 / 72.0; + bounds->wd = r.size.width * 72.27 / 72.0; + bounds->ht = r.size.height * 72.27 / 72.0; CGPDFDocumentRelease(document); result = noErr; } @@ -1018,8 +1019,8 @@ find_pic_file(char** path, realrect* bounds, int pdfBoxType, int page) result = GraphicsImportGetImageDescription(ci, &desc); bounds->x = 0; bounds->y = 0; - bounds->wd = (*desc)->width * 72.0 / Fix2X((*desc)->hRes); - bounds->ht = (*desc)->height * 72.0 / Fix2X((*desc)->vRes); + bounds->wd = (*desc)->width * 72.27 / Fix2X((*desc)->hRes); + bounds->ht = (*desc)->height * 72.27 / Fix2X((*desc)->vRes); DisposeHandle((Handle)desc); (void)CloseComponent(ci); } diff --git a/Build/source/texk/web2c/xetexdir/pdfimage.cpp b/Build/source/texk/web2c/xetexdir/pdfimage.cpp index 2c60d09c790..12eda2c68b0 100644 --- a/Build/source/texk/web2c/xetexdir/pdfimage.cpp +++ b/Build/source/texk/web2c/xetexdir/pdfimage.cpp @@ -27,6 +27,7 @@ my_fmin(double x, double y) int pdf_get_rect(char* filename, int page_num, int pdf_box, realrect* box) + /* return the box converted to TeX points */ { GString* name = new GString(filename); PDFDoc* doc = new PDFDoc(name); @@ -73,10 +74,10 @@ pdf_get_rect(char* filename, int page_num, int pdf_box, realrect* box) break; } - box->x = 72 / 72.27 * my_fmin(r->x1, r->x2); - box->y = 72 / 72.27 * my_fmin(r->y1, r->y2); - box->wd = 72 / 72.27 * fabs(r->x2 - r->x1); - box->ht = 72 / 72.27 * fabs(r->y2 - r->y1); + box->x = 72.27 / 72 * my_fmin(r->x1, r->x2); + box->y = 72.27 / 72 * my_fmin(r->y1, r->y2); + box->wd = 72.27 / 72 * fabs(r->x2 - r->x1); + box->ht = 72.27 / 72 * fabs(r->y2 - r->y1); delete doc; diff --git a/Build/source/texk/web2c/xetexdir/xetex.ch b/Build/source/texk/web2c/xetexdir/xetex.ch index fd9c6eacf58..2c84aa57c05 100644 --- a/Build/source/texk/web2c/xetexdir/xetex.ch +++ b/Build/source/texk/web2c/xetexdir/xetex.ch @@ -65,7 +65,7 @@ authorization from SIL International. @d XeTeX_version=0 @d XeTeX_revision==".998" -@d XeTeX_version_string=='-0.998.3' {current \XeTeX\ version} +@d XeTeX_version_string=='-0.998.5-dev' {current \XeTeX\ version} @z @x @@ -7610,9 +7610,9 @@ begin { access the picture file and check its size } result := find_pic_file(address_of(pic_path), address_of(bounds), pdf_box_type, page); - setPoint(corners[0], xField(bounds) * 72.27 / 72.0, yField(bounds) * 72.27 / 72.0); - setPoint(corners[1], xField(corners[0]), (yField(bounds) + htField(bounds)) * 72.27 / 72.0); - setPoint(corners[2], (xField(bounds) + wdField(bounds)) * 72.27 / 72.0, yField(corners[1])); + setPoint(corners[0], xField(bounds), yField(bounds)); + setPoint(corners[1], xField(corners[0]), yField(bounds) + htField(bounds)); + setPoint(corners[2], xField(bounds) + wdField(bounds), yField(corners[1])); setPoint(corners[3], xField(corners[2]), yField(corners[0])); x_size_req := 0.0; @@ -7686,7 +7686,7 @@ begin if (x_size_req <> 0.0) or (y_size_req <> 0.0) then do_size_requests; calc_min_and_max; - make_translation(address_of(t2), -xmin, -ymin); + make_translation(address_of(t2), -xmin * 72 / 72.27, -ymin * 72 / 72.27); transform_concat(address_of(t), address_of(t2)); if result = 0 then begin @@ -8662,12 +8662,15 @@ begin end_diagnostic(false); end; -procedure font_mapping_warning(mappingNameP:void_pointer; mappingNameLen:integer); +procedure font_mapping_warning(mappingNameP:void_pointer; + mappingNameLen:integer; + warningType:integer); { 0: just logging; 1: file not found; 2: can't load } var i: integer; begin begin_diagnostic; - print_nl("Font mapping `"); + if warningType=0 then print_nl("Loaded font mapping `") + else print_nl("Font mapping `"); print_utf8_str(mappingNameP, mappingNameLen); print("' for font `"); i := 1; @@ -8675,7 +8678,13 @@ begin print_visible_char(name_of_file[i]); { this is already UTF-8 } incr(i); end; - print("' not found."); + case warningType of + 1: print("' not found."); + 2: begin print("' not usable;"); + print_nl("bad mapping file or incorrect mapping type."); + end; + othercases print("'.") + endcases; end_diagnostic(false); end; |