AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 44 |
r3wp | 965 |
total: | 1009 |
results window for this page: [start: 201 end: 300]
world-name: r3wp
Group: Ann-Reply ... Reply to Announce group [web-public] | ||
ChristianE: 11-Jun-2005 | On a fresh console: what does system/options/standard/face/font look like? | |
Graham: 11-Jun-2005 | >> system/options/standard/face/font ** Script Error: Invalid path value: standard ** Near: system/options/standard/face/font >> | |
ChristianE: 11-Jun-2005 | typo, sorry, system/standard/face/font | |
Graham: 11-Jun-2005 | >> probe system/standard/face/font make object! [ name: "arial" style: none size: 12 color: 0.0.0 offset: 2x2 space: 0x0 align: 'center valign: 'center shadow: none ] | |
Pekr: 10-Aug-2005 | :-) I also hope we get answer to font situation rather quickly ... hopefully, as Jaime mentioned, it will be FreeType .... | |
Ingo: 30-Aug-2005 | REBOL [ Title: "Local Index" Type: 'index dynamic: true plugin-pane: 0.5 ] title "Local Files" app 0.3 group "A" effect [multiply green] group "B" icon %action.png action "a\gitarre" do [explore %/f/gitarre/] action "a\view-root" do [explore view-root] action "a\hamster" do [call "H:\prog\Hamster\Hamster.exe"] action "b\Internet" do [ call "H:\Programme\offline-proxy-mm3\MM3-WebAssistant.bat" call "C:\Programme\discountsurfer\discountsurfer.exe" call "H:\Programme\Mozilla\Firefox\firefox.exe" call "C:\Programme\Opera75\Opera.exe" ] action "b\Firefox" do [ call "H:\Programme\Mozilla\Firefox\firefox.exe"] icon %web-surf-action.png action "c\desktop" do [editor view-root/desktop.r] action "c\imap" do [editor %imap-handler.r] file "Info" %info.txt file "T\Test" %test1.r file "T\Test2" %test2.r file "T\Test" %test3.r ; this is composed ---- file (form now/date) %dummy.r action "Click me" #clickme do [ alert "hi" [Text "This will be displayed within the desktop" [alert "ho"]] ] action "Click me 2" #clickme2 do [ alert "hi" ; no return value, so nothing displayed in the desktop ] action "PRINT" do [print "^/^/----------------------^/^/^/"] action "prin somethin" do ["yea"] file "t\Test" %dummy.r ; this will draw the plugin app-draw [face /local cl-size][ cl-size: to pair! reduce [face/size/x 50] face/pane: layout/offset[ at 0x0 text "00:00:00" cl-size center 255.155.40 with [ font: [size: 24] rate: 1 user-data: none feel: make feel [ engage: func [face action event i] [ if user-data <> now/time [ i: form user-data: now/time if 7 > length? i [append i ":00"] face/text: i show face ] ] ] ] text "TEST" button "hi" [alert "you!"] button "CLOSE" [unview/all] ] 0x0 face/size ] ; if you need to redraw after a resize, not yet used app-resize [new-size][] | |
Rebolek: 18-Dec-2005 | When only windows version of 1.3.2 has font support in AGG, is it considered as an OS specific feature? I hope not. | |
Group: View ... discuss view related issues [web-public] | ||
Ashley: 27-Feb-2005 | A question for those who have delved into View facets; which facets (apart from 'data) are *not* used by View? 'action seems to be reserved for the VID feel system, 'span seems to have an undefined effect if used. The complete list is: type: 'face offset: 0x0 size: 100x100 span: none pane: none text: none color: 200.200.200 image: none effect: none data: none edge: make object! [color: 200.200.200 image: none effect: none size: 2x2] font: make object! [name: "arial" style: none size: 12 color: 0.0.0 offset: 2x2 space: 0x0 align: 'center valign: 'center shadow: none] para: make object! [origin: 2x2 margin: 2x2 indent: 0x0 tabs: 40 wrap?: true scroll: 0x0] feel: make object! [redraw: none detect: none over: none engage: none] saved-area: none rate: none show?: true options: none parent-face: none old-offset: none old-size: none line-list: none changes: none face-flags: 0 action: none I'm trying to determine which facets I can safely use when not using VID. | |
Ashley: 2-Mar-2005 | Graham: It's *Alpha* so no hard benchmark results yet, but moving from VID to View for mdViewer cut the WinXP process size from 15MB to 12MB and improved speed threefold ... I'd expect similiar things from a View-based GUI. Anton: "No it doesn't Ashley, read again." - I thought the opening paragraph of the referenced document made it pretty clear; "Facets are attributes of a face. Facets include the face's location, size, color, image, font, style, paragraph format, rendering effects, behavior functions, and other details.", but I'll probably use the term attributes anyway as facets might be confused with faces. Louis: Good documentation can make *anything* seem simple! ;) Robert: Maybe. Main purpose of a View-GUI is for high-performance scripts where you really want to know what *every* face is doing. | |
Group: I'm new ... Ask any question, and a helpful person will try to answer. [web-public] | ||
RobertS: 31-Aug-2007 | ; I did a dif between the functions in VIEW and those in CORE for a default install. What I get is this ( I hope it is useful to have al 106 in one place ) alert brightness? caret-to-offset center-face choose clear-face clear-fields confine crypt-strength? dbug deflag-face desktop dh-compute-key dh-generate-key dh-make-key do-events do-face do-face-alt do-thru draw dsa-generate-key dsa-make-key dsa-make-signature dsa-verify-signature dump-face dump-pane edge-size? editor emailer exists-thru? find-key-face find-window flag-face flag-face? flash focus get-face get-net-info get-style hide hide-popup hilight-all hilight-text hsv-to-rgb in-window? inform insert-event-func inside? install launch-thru layout link-relative-path load-image load-stock load-stock-block load-thru local-request-file make-face notify offset-to-caret open-events outside? overlap? path-thru read-net read-thru remove-event-func request request-color request-date request-dir request-download request-file request-list request-pass request-text reset-face resize-face rgb-to-hsv rsa-encrypt rsa-generate-key rsa-make-key screen-offset? scroll-drag scroll-face scroll-para set-face set-font set-para set-style set-user show show-popup size-text span? stylize textinfo unfocus uninstall unlight-text unview vbug view viewed? win-offset? within? | |
Group: Make-doc ... moving forward [web-public] | ||
Geomol: 13-Apr-2005 | Someone asked me about NicomDoc recently. I just added font support and escape mode (to turn on and off using backslash as escape character), changed some definitions and fixed a bug or two. I'll add options and make it version 1.0 targeted at HTML output. Should happen within the next days, where I'll release it. | |
MikeL: 31-May-2005 | Paul, One thing to keep in mind is that you should want to leverage html stylesheets. In your make-doc version add the reference to the class then let a .css determine most of the presentation parameters. For example, I wanted to be able to add a question and have it presented with a heading very similar to a note box but to have a different label i.e. "Question" and a distinct look. This change was required to parse it ["=q" | "q:" | "question:"] text-line (emit-text 'question) | from the input stream. This emitted the html question [emit [{<p><div class="question"> Question: } doc/2 {</div>}]] Change the make-doc script you are using to emit a reference to your stylesheet instead of inlining it. I put this in my css to present a question in box that stands out (for me) div.question { padding: 10px; background-color: linen; font-size: 14px; font-family: Helvetica; border: 6px groove gold; width: 90%; } The reason for .css is that now you can change the stylesheet and don't have to change the html or re-generate it. If you want your question box to tan instead of linen then you just change your .css If you have something you feel strongly about you can create a soapbox style. For more on this see http://www.csszengarden.com/ p.s. when you change make-doc, clearly identify the lines that you change with comments so that when you get a new version you can retrofit it and get the benefit of the upgrades. | |
[unknown: 5]: 13-Jun-2005 | Mike - I have already kinda did like you said as I somewhat copied note but made a new verse type. The thing that looks like would make madedoc better (might have it already) if if each item could be parse with styles also. For example - come up with a way to parse one single line item into 3 parts but format each part different with different color for this and different font for that but have it still be able to be in the template. | |
Group: PDF-Maker ... discuss Gabriele's pdf-maker [web-public] | ||
Louis: 8-Aug-2005 | Here is my code: append top text pdf: copy [] page: compose/deep [ textbox [ font Courier 4.5 as-is (:top) ] ] append/only pdf page write/binary %deposit-slip.pdf layout-pdf pdf browse %deposit-slip.pdf | |
Henrik: 10-Aug-2005 | what would the possibilities be for adding fonts? I need access to use the OCR font now... | |
Gabriele: 11-Aug-2005 | what you have to do is: extend the typesetter so that it can read font descriptions and build glyph width and kerning pairs tables (Volker has an AFM file parser); extend the dialect so that it can somehow recognize and load external fonts; study the PDF reference to see what you need to do to include the font in the PDF file (at the very least, you have to provide a font object; i'm not sure if this is sufficient, but i hope that the reader is able to load external fonts once you give it the font name and description; in theory you should embed the font into the PDF file, which usually means parsing the font file and so on) | |
Henrik: 11-Aug-2005 | louis: yes, I've used it in a few apps so far with great success, because it's very stable and fast. the only things I miss are better font handling, some better docs and importing vector drawings into a PDF. Getting OCR fonts in will really make it useful for me. | |
Gabriele: 24-Oct-2005 | 1) no; 2) no. Sorry. Supporting other charsets requires changes to the code AND to the font metrics data. About pdf-tables, never got to document it at all. i don't have any simple example either, except from some i provided here or on the ml long time ago. | |
Gabriele: 4-Aug-2006 | my plan is to eventually have that in version 2 (a first release of version 2 is due in a couple weeks). however, note that while the pdf format directly supports latin1 encoding, it does not support unicode encodings directly. so it's a pain to make it work. openoffice, for example, creates divides the characters you use in the document in groups of 256, then creates a new custom font for each group. (i also assume that the 14 standard fonts do not support unicode, so you need custom font support to be able to use unicode.) | |
Gabriele: 4-Aug-2006 | Henrik: that can't be done, you need low level font access for text flow. and you can't do footers or text flow without that. | |
Gabriele: 11-Aug-2006 | just typeset the first paragraph with the total-fit algo and actual font metrics. now i just add some page breaking (first fit), add the pdf file output from previous version, and i've got an alpha to test. :) (i'll be on vacation next week so this probably means the alpha will be available after that) | |
Graham: 25-Aug-2006 | what we also need to see is different font styles within the columns of text. | |
Gabriele: 25-Aug-2006 | bold and italic are a different font (i.e. you use Times-Italic instead of Times-Roman) | |
Gabriele: 2-Sep-2006 | not yet. that will be possible when i implement unicode support (and you'll need a font with all the chars you want). | |
Gabriele: 3-Sep-2006 | oldes: i have an utf8 parser too. however it's not that easy because the PDF format does not support unicode directly. you have to create custom fonts. i have to study this in detail, but i noticed that OpenOffice generates a font for each set of 256 characters. | |
Gabriele: 4-Mar-2007 | oldes: unfortunately, no. he has to specify the encoding in the font description. the only "built-in" encodings are Adobe, WinANSI (latin1) and Mac. I think adobe is a variant of latin1. | |
Gabriele: 4-Mar-2007 | so i will either need to figure out how to create a font encoding description that works for utf-16 (but i guess it would require a huge table, and so would make the documents big), or i'll need to use the same technique as OO | |
Gabriele: 15-Feb-2009 | then, there's the problem of the fonts. TeX has its own fonts which are designed correctly. TTF is not even close to what MetaFont can do, and the standard symbol font is not as good as the TeX fonts. Even if I added a good formula renderer to the pdf maker, without a good font it wouldn't look very good anyway. | |
Gabriele: 12-May-2009 | to do anything else font tricks are often being used. i wish they just had support for utf-8... | |
Gabriele: 13-May-2009 | let me know if you find out that a new version of the format supports unicode or that there is a simple way to implement it. to me it looks like the only way would be to create your own 1 or 2 byte encoding with the glyphs you use, or to do like OpenOffice does - it creates a separate font for each set of 256 different characters and then selects the correct font for each character. | |
Gabriele: 23-Aug-2010 | define-func 'drop-image [img font size /local iw ih lh mrgns] [ ( iw: img/size/x / 5.34 ih: img/size/y / 5.34 lh: pdfm/get-font-info font size lh: lh/max-height + lh/max-depth mrgns: copy [0 0] loop round/ceiling ih / lh - 1 [ repend mrgns [iw + 2 0] ] append mrgns [0 0] none ) justify with margins mrgns box iw lh 0 [ image xbl ybl - ih + lh iw ih img ] space 2 font* font size ] | |
Group: AGG ... to discus new Rebol/View with AGG [web-public] | ||
Guest: 3-Jan-2005 | you had some font shape effects that were pretty impressive, can you pls post those ? | |
Guest: 3-Jan-2005 | pen doesn't make contour around filled polygons Rebol/View crashes when drawing filled poligons partially out of visible face area = you cannot zoom/move any object out of face borders - very annoying problem (this problem doesn't crash latest Rebol/Link...instead of it interpret shows "not enough memory" error) DRAW's 'text command doesn't recognize underlined font style (manipulating text will be explained in the next issue of ZINE...Watch out!) my enhancement dreams: missing 'ellipse command - why there is no posible to make elipse when 'circle is available?!? missing 'point or 'dot command - currently you have to write [line 10x10 10x10] to make single dot at 10x10 coords on the screen missing 'round command - DRAW cannot make arcs in a simple way missing 'fill-pattern command - for simple texturing of filled polygons | |
Cyphre: 3-Jan-2005 | this is the code whith image-patterns: fnt: make face/font [size: 240] view layout [box 800x260 white effect [draw [pen logo.gif font fnt text 1 "REBOL"]]] | |
Group: Web ... Everything web development related [web-public] | ||
DideC: 3-Mar-2005 | Q for javascript/CSS guru. How to change the font weigth of an <input type="text"> field with Javascript ? I have a function called on OnChange() event that check the value and I want to display the field in Bold if value > 0, or normal if value = 0 | |
Geomol: 28-May-2006 | From http://www.w3.org/TR/REC-html32 A few user agents support the WIDTH attribute. It provides a hint to the user agent of the required width in characters. The user agent can use this to select an appropriate font size or to indent the content appropriately. It's not the width of the line. | |
[unknown: 9]: 28-May-2006 | Dideir, yeah we ran into this recently in allowing people to escape code inside our Wiki. We allow Rebol, HTML, etc. At first it seems counter intuitive. But this is the way of HTML. Aside from the straight forward concept as Sunanda mentioned, if you are willing to process the code a little you can count the characters of the longest line, and scale the text to match the final output. A couple of points dropped on a font stil are readable, and many sentences still fit. Another is to encode the whole thing, in other words convert all the "<" for example to escape sequences. Now HTML will wrap everything automatically. | |
Pekr: 18-Jun-2007 | Max - re templating. Yes, I use "code", actually not code, just markers like <font face="Arial" size="2"><!--name-->ne<!--end--></font></td> | |
Chris: 18-Jul-2009 | Depends to what degree you use html to define visual aspects. The comparison above is talking old school page design where your markup contains all the bgcolors, widths, font colours, etc. (FrontPage-esque) Typically this approach does significantly increase page size. Using tables mainly as an alternative to <div> as a way to divide up page components in an otherwise CSS driven design isn't going to be at all costly in comparison. Actual bandwidth cost I guess is case specific. | |
Robert: 2-Jun-2011 | I have a question regarding fonts on web-sites: Take a look at this one here: http://www.binaryage.com/ It uses a font called PLAY which I like a lot. This font wasn't installed on my system, but the web-site displayed it. It's even not one of the standard web fonts I know. Why does this work? | |
Group: SDK ... [web-public] | ||
Bo: 23-Mar-2006 | Set-Net not provided. ** Script Error: stylize has no value ** Near: stylize [ wmtxt: text "Test" 255.255.0 font-size 16 wtext: text " " 640 as-is no-wrap black white box: box... ** Press enter to quit... | |
Graham: 18-Dec-2006 | Does freetype support also imply type 1 font support? | |
Cyphre: 18-Dec-2006 | From the FreeType site: # By default, FreeType 2 supports the following font formats. * TrueType fonts (and collections) * Type 1 fonts * CID-keyed Type 1 fonts * CFF fonts * OpenType fonts (both TrueType and CFF variants) * SFNT-based bitmap fonts * X11 PCF fonts * Windows FNT fonts * BDF fonts (including anti-aliased ones) * PFR fonts * Type 42 fonts (limited support) | |
Cyphre: 18-Dec-2006 | (but I haven' t tested all those font formats, just ttf) | |
Cyphre: 18-Dec-2006 | I can test it if you point me to some free font to download. | |
Cyphre: 18-Dec-2006 | ah, found /gsfonts dir in my distro...will test some font from it in a minute... | |
Henrik: 18-Jun-2008 | the way I see it, try a simple make face [text: "simplerhack" font: make face/font []] I don't know if the font object is directly available in rebface, but try it. | |
Henrik: 18-Jun-2008 | actually I think it is. when we were fixing 2.7.6 for OSX Leopard we had a very similar problem and I had to build rebface with a face that loaded a font. it was done entirely without VID. | |
amacleod: 4-Mar-2009 | I'm also getting a lot of "misplaced item" errors but again only in encapped version.... Unknown word or style: rejoin Misplaced item: ["This version: " this_version] Unknown word or style: rejoin Misplaced item: ["Last Update: " last_db_update/date] Misplaced item: 150 Misplaced item: "6-TOWE" Misplaced item: [get_sections cur_chap: copy face/text] Misplaced item: 450 Unknown word or style: red Unknown word or style: font-size Misplaced item: 25 Unknown word or style: bold Unknown word or style: underline Unknown word or style: chtit Misplaced item: 0.0 Misplaced item: 255.100.100 Misplaced item: 90.90.90 Unknown word or style: rejoin Misplaced item: ["14." " " "MAINTENANCE OF PORTABLE ALUMINUM LADDERS"] Misplaced item: [my-scroll-panel/access/set-scroll-offset my-scroll-panel 0x-1 * 699x15723 focus] Misplaced item: 0x0 Unknown word or style: edge Misplaced item: [color: black size: 2x2] Unknown word or style: effect Misplaced item: [merge luma -80] | |
amacleod: 13-Dec-2009 | That may also be the problem...some of the officers have bad eyes and may have increased font size..I'll check it out. Thanks for the hints Gregg. | |
Group: !RebGUI ... A lightweight alternative to VID [web-public] | ||
Ashley: 23-May-2005 | Latest build available at: http://www.dobeash.com/files/RebGUI-023.zip Highlights include: - Changed default font from "Arial" to "Verdana" - Added label and table widgets - Added window-level 'do block support - Added 'reverse keyword to support windows style right-to-left widget placement - Renamed set-title to show-title - Merged %request-file.r into %requestors.r - Renamed %gui.r to %rebgui.r and prefixed other files with same Read more about these changes here: http://www.dobeash.com/it/rebgui/display.html#section-2.2 http://www.dobeash.com/it/rebgui/display.html#section-3.3.2 http://www.dobeash.com/it/rebgui/display.html#section-3.4 http://www.dobeash.com/it/rebgui/display.html#section-4.3 http://www.dobeash.com/it/rebgui/display.html#section-5.15 http://www.dobeash.com/it/rebgui/display.html#section-5.26 | |
ChristianE: 4-Jun-2005 | ; 15-Mar-2005 Pascal Lefevre ; 27-Apr-2005 Pascal Lefevre ; 4-Jun-2005 Christian Ensel (minor color and shape suggestions) led: make face [ size: -1x4 effect: [draw [pen edge-color fill-pen window-color box 0x0 0x0]] font: default-font para: make default-para [origin: as-pair base-size 2] feel: make default-feel [ redraw: func [face act pos /local colors] [ if act = 'show [ colors: reduce case [ any [face/data = 1 face/data = true] [ [btn-text-color btn-text-color] ] any [face/data = 0 face/data = false] [ [edge-color btn-up-color] ] true [ [edge-color white] ] ] face/effect/draw/2: colors/1 face/effect/draw/4: colors/2 ] ] ] init: does [ if word? data [data: to logic! data] if negative? size/x [size/x: 1000000 size/x: 4 + para/origin/x + first size-text self] effect/draw/6/y: unit-size effect/draw/7: as-pair unit-size * 3 unit-size * 2,5 ] ] | |
Ashley: 16-Jun-2005 | button: make rebface [ size: 12x4 text: "" data: reduce [ load #{ 89504E470D0A1A0A0000000D49484452000000070000000E0806000000E35D06 1B0000001374455874536F667477617265005245424F4C2F566965778FD91678 0000006D49444154789C7DD0210EC0201404510EC78DB90937402030080C09E6 3743B250DAA62423D8574C9D9939EFBD3D6377B7CB3ADA9C608CB1EABD6FD440 AD35ABB56E1410504A39911704A49436F2B502628C6FD4AB0319D527E69C672F 6450C0811A2884305B481A0513FF7EFC050B081E1B1469CACD0000000049454E 44AE426082 } load #{ 89504E470D0A1A0A0000000D49484452000000070000000E0806000000E35D06 1B0000001374455874536F667477617265005245424F4C2F566965778FD91678 0000004E49444154789C63F8FFFF3F838B8BCB7F740C12874B6CDEBC198E6162 0CE812C80A50242F5DBAF4FFE1C387608C2209921828499802ACAE8561E28D85 09BE7CF9125512844182300C0F3E7C010F0010F10EBBAF4E057A000000004945 4E44AE426082 } load #{ 89504E470D0A1A0A0000000D49484452000000070000000E0806000000E35D06 1B0000001374455874536F667477617265005245424F4C2F566965778FD91678 0000007049444154789C63F8FFFF3F838B8BCB7F740C12874BFCBB3F0B8E6162 0C30893F97AAE018A60045F2FBF7EF244AC28CFBF4E9139C0D97FC753C118CDF BD7B0767C3257FEEF306E3972F5FC2D9C449FED8620AC64F9F3E85B331241F3E 7C885B1219C32541F8E974063886071FBE800700F5AD02E08E740D5300000000 49454E44AE426082 } ] image: first data effect: [mix extend 3x7 1x1] font: make default-font [align: 'center valign: 'middle] feel: make default-feel [ over: func [face act pos] [ face/image: either act [face/data/3] [face/data/1] show face ] engage: func [face act event] [ either act = 'down [ face/image: face/data/2 show face face/action face ][ if act = 'up [face/image: face/data/1 show face] ] ] ] init: does [effect/4: size - image/size] ] | |
shadwolf: 22-Jun-2005 | the only thing that I wasnt able to do is use TTF font files with Inscape | |
Ashley: 22-Aug-2005 | Latest build available at: http://www.dobeash.com/files/RebGUI-034.zip *** Unzip this file into your existing RebGUI 0.3.0 distribution. Requires View 1.3.1 *** Highlights include: - request-dir requestor updated - alert and question requestors added - Tab focus expanded to include edit-list handling (see %focus-demo.r for details) - Button image now resizes correctly - text-list widget totally rewritten to use [newly documented] View 1.3.1 iterated faces - text-list now supports Ctrl+click, Shift+click, Ctrl+A - text-list scrollbar now reacts to current display state (eg. disappears if not required, alters dragger ratio as rows are added, etc) - check and radio widget aesthetics improved - added options support to layout function and text-list and check widgets - changed base-size from 4x5pixels to 5x4 pixels (better granularity) - reworked all widget sizes to account for above - fixed scaling problems with many widgets - updated focus-demo.r - greatly enhanced and expanded %tour.r to demonstrate more variations and usage cases - added "live" unit-size and font-size drop-lists to %tour.r - numerous other minor bug fixes and coding improvements In the works - table widget being rewritten along the same lines as the new improved text-list widget - aiming for a 0.4.0 beta release prior to DevCon2005 | |
Henrik: 26-Aug-2005 | field font [align: 'right] should work | |
Group: rebcode ... Rebcode discussion [web-public] | ||
Oldes: 23-Nov-2005 | because i use it to make font from the bitmap and there is the y axis counted from below, you may also aske why there is the innerLine (it's because to render the hole correctly there must be correct direction - it could be done in the rebcode, but I found it when I had the inner tracing done and don't want to do it again - so I just changed the "line" to "innerLine" and must fix it in the to-pairs function -> for outer shape I use append and for holes insert :) | |
Oldes: 23-Nov-2005 | here is example how to use it in real life: do http://box.lebeda.ws/~hmm/rebol/projects/font-tools/latest/test.r | |
Group: Tech News ... Interesting technology [web-public] | ||
Rebolek: 9-Jul-2007 | interesting comparison of different font-rendering techniques - http://antigrain.com/research/font_rasterization/index.html | |
Oldes: 10-Feb-2008 | I wonder why it's not already possible... I remember there was a little support for font embedding in Netscape. | |
Group: Postscript ... Emitting Postscript from REBOL [web-public] | ||
Gabriele: 26-Apr-2006 | once you have a typesetter written in rebol, though, you can apply it to draw too; draw doesn't offer the low level access to font data you need, so that will need to be separate; but if you can do it for pdf, you can do it for whatever, if you use the same fonts. | |
Henrik: 8-Jun-2006 | I haven't followed it, but did you solve font positioning in DRAW vs. postscript? | |
Graham: 8-Jun-2006 | I don't have a problem with font positioning in draw and postscript. | |
Henrik: 13-Jun-2006 | looks like you need to parse AFM files to get the width information out of your font files to make proper font justification. so we need to build an AFM parser? | |
Geomol: 6-Nov-2006 | Also new font options are included. bold and italic is valid words inside the font block. And "Times" can be written as "Times" or "Times-Roman", upper- lower-case doesn't matter, the dialect should figure it out. | |
Henrik: 7-Nov-2006 | pekr, that's very hard, because the problem is also with font sizes. DRAW doesn't follow good conventions for sizes right now. VIEW is better, but it's all aliased graphics. | |
Henrik: 7-Nov-2006 | also with two different font rendering engines... wouldn't View get smaller if freetype was used in View as well? | |
Rebolek: 7-Nov-2006 | you can't use current View for that task - you don't know font's baseline, so it's not possible to position different sizes of fonts on same line. | |
Cyphre: 7-Nov-2006 | Yes, you are right, there are two different font engines which is not much efficient. Moreover the DRAW text rendering was meant to be just for really simple labeling(the main text engine in R2 is still the original FACE text rendering) and it would need some improvements for more complex usage. All this should be unified and improved in R3. There will be only one text engine with rich-text dialect. | |
Geomol: 8-Nov-2006 | REBOL PostScript Dialect v. 0.4.0 released: http://home.tiscali.dk/john.niclasen/postscript/postscript.r Documentation here: http://home.tiscali.dk/john.niclasen/postscript/postscript.html Added MediaType, ManualFeed and MediaPosition to control paper selection (tray). Also made Courier font ISOLatin1 encoded. And better PS comments in the output according to PostScript Language Document Structuring Conventions Specification. | |
Geomol: 10-Apr-2007 | It may be more clear, if we look at PS as a low level language to control some type of printer or typesetter. It goes like: move to this position, print this text using this font, move to this other position, print text, ... Landscape is done with 90 degree rotation before doing the print command. | |
Geomol: 23-Feb-2008 | This with large printfiles, it's the same, that happens, if you print text using a font, that the printer doesn't know. Everything is converted to image data, and one page can be several MB. | |
Henrik: 19-Apr-2008 | looks like getting something so simple as the font height is rather difficult in postscript | |
Henrik: 19-Apr-2008 | Geomol, I have the structure change needed for text to support the font height, so the vertical centering can be made, but I just can't find the postscript commands necessary to obtain the font height. | |
Graham: 19-Apr-2008 | you define the font height when you set the font. | |
Henrik: 19-Apr-2008 | the width of the text yes, not the height. and I may not know the font at rendering time as that may be set in a completely different part of the program. | |
Henrik: 19-Apr-2008 | Got the font size to work, but it doesn't take the baseline into account. | |
Henrik: 20-Apr-2008 | The changes are: - Stores the font size inside PS every time a new font is selected. This is not used however, but perhaps is useful in the future. - Added bottom, middle and top alignment for TEXT. Similarly to how you specify a size for LEFT, CENTER and RIGHT, you can enter a size for TOP, MIDDLE and BOTTOM: Some text center 400 middle 200 Both sets are optional. The default alignment is LEFT and BOTTOM. My changes are marked HMK in the source. I hope it is of use. | |
Henrik: 20-Apr-2008 | The problem is to get the height accurately for all glyphs for a font (I just got that now). Some fonts have very high tops and very low bottoms and you want that to work for any font and letter combination we throw at it. it would be harder to get that information inside REBOL than inside postscript. | |
Henrik: 20-Apr-2008 | I got it rendered now so that the vertical position is at least consistent now, but the font is offset a few points too far down. I don't know why yet, but it's probably the baseline again. | |
Henrik: 20-Apr-2008 | there is another method which is to get the bbox information from the font metric file itself. it's much faster, since it's just lookup, but I couldn't find an example of how to read it. | |
Henrik: 20-Apr-2008 | so my current method is Graham's, except for calculating the entire alphabet. we should probably work on getting that information from the font metric file instead. | |
Geomol: 20-Apr-2008 | So it doesn't matter, how high the font is. | |
Henrik: 20-Apr-2008 | The baseline problem is the one I'm hunting a solution for. About the font metrics, the bbox for the whole font is stored in FontBBox in the font dictionary. | |
Henrik: 20-Apr-2008 | and this information shouldn't need to be calced if we can get that from FontBBox in the font dictionary. still hunting for how to obtain it. :-) | |
Henrik: 20-Apr-2008 | what I did at first was just to use the font size. that doesn't work, because it does not take the baseline into account. | |
Henrik: 20-Apr-2008 | The bbox information for the entire font is stored in each font metric file as a [llx, lly, urx, ury] coordinate set, so I shouldn't need to calculate it. This information is crucial in order to get one line of vertically centered text. I already got everything in place except that particular number. :-) | |
Geomol: 20-Apr-2008 | Isn't this centered? PageSize A4 page [ font [Times 40] linewidth 0 at 0x421 "Centered text" center 595 ] | |
Henrik: 20-Apr-2008 | as mentioned before, that won't work, because the font information is not obtainable from inside REBOL. it has to be done inside postscript. I've already tried that method a year ago and it failed. :-) | |
Geomol: 20-Apr-2008 | There is no information about font (other than Times 40) in my example. | |
Henrik: 20-Apr-2008 | ok, tell me then the algorithm for calculating the font height inside REBOL. :-) you cannot possibly know without reading and parsing the .PFM files yourself. | |
Henrik: 20-Apr-2008 | and as mentioned at first, I already tried the font size... doesn't work. | |
Geomol: 20-Apr-2008 | Why would I need the font height? I didn't need that in my example to center the text. | |
Geomol: 20-Apr-2008 | PageSize A4 page [ font [Times 18] at 60x421 "abcdefg" font [Times 36] at 130x421 "abcdefg" font [Times 96] at 260x421 "abcdefg" ] | |
Geomol: 20-Apr-2008 | Do you have the psrefman.pdf document for PS second edition? Seciton 5.4 has a drawing of font positioning. | |
Geomol: 20-Apr-2008 | But you're right, that if you really want that, then you need to get info from each letter in the font. | |
Henrik: 20-Apr-2008 | but I do wish that each char in a font had a center point that indicates the absolute center of a character both horizontally and vertically. horizontally, that would be individual for each char, but vertically it has to be identical for all chars, like the baseline is. | |
Geomol: 20-Apr-2008 | I can see, that text in tables in html is centered more like you want it, at least in Safari. Actually the text is much lower in Safari, so there is more space above the text than below, if you use words with 'g'. I can't judge, if they do a simple calculation or use the font box. | |
Henrik: 20-Apr-2008 | And when I say the letter is tall in Helvetica or Times, that means it may not be so in other fonts. I don't believe a font like Verdana does this. This is why when getting the absolute center for a font, you must calculate it using all glyphs in the font. | |
Group: !Cheyenne ... Discussions about the Cheyenne Web Server [web-public] | ||
Graham: 14-Jul-2007 | This is with the latest beta ... >> page: read http://127.0.0.1/show.cgi URL Parse: none none 127.0.0.1 none none show.cgi Net-log: ["Opening" "tcp" "for" "HTTP"] connecting to: 127.0.0.1 Net-log: {GET /show.cgi HTTP/1.0 Accept: */* Connection: close User-Agent: REBOL View 1.3.2.3.1 Host: 127.0.0.1 } Net-log: "HTTP/1.1 200 OK" Net-log: ["low level read of " 2048 "bytes"] Net-log: ["low level read of " 2048 "bytes"] == {<HTML><BODY><FONT FACE='ARIAL' SIZE='-1'><a href="/">Back</a><br><br> <B>Script path :</B> /E/cheyenne916/Cheyenne/www/ <BR><BR... >> page: read/custom http://127.0.0.1/show.cgireduce ['post join "content=" url-encode content ] URL Parse: none none 127.0.0.1 none none show.cgi Net-log: ["Opening" "tcp" "for" "HTTP"] connecting to: 127.0.0.1 Net-log: {POST /show.cgi HTTP/1.0 Accept: */* Connection: close User-Agent: REBOL View 1.3.2.3.1 Host: 127.0.0.1 Referer: http://127.0.0.1/show.cgi Content-Type: application/x-www-form-urlencoded Content-Length: 147479 } Net-log: none ** User Error: Error. Target url: http://127.0.0.1/show.cgicould not be retrieved. Server response: none ** Near: page: read/custom http://127.0.0.1/show.cgireduce ['post join "content=" url-encode content] >> |
201 / 1009 | 1 | 2 | [3] | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |