0% found this document useful (0 votes)
39 views

Lecture7 PDF

The document discusses fonts, font sizes, page sizes, optical character recognition, virtual memory, compression techniques, and limitations on interactive performance. It covers topics such as font names and styles, measuring font size in points, page description languages, WYSIWYG, scanners and OCR, using compression to reduce file sizes, and factors that can slow down interactive systems like computation time and disk access speed.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Lecture7 PDF

The document discusses fonts, font sizes, page sizes, optical character recognition, virtual memory, compression techniques, and limitations on interactive performance. It covers topics such as font names and styles, measuring font size in points, page description languages, WYSIWYG, scanners and OCR, using compression to reduce file sizes, and factors that can slow down interactive systems like computation time and disk access speed.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

chapter 2

the computer
Fonts
• Font – the particular style of text (physical appearance).
The shape of a font is determined by its font name
Courier font
Helvetica font
Palatino font
Times Roman font

• Size of a font measured in points (1 pt about 1/72”)


(vaguely) related to its height. A 12 point font has about six
lines per inch.
This is ten point Helvetica
This is twelve point
This is fourteen point
This is eighteen point
and this is twenty-four point
Fonts
• When talking about font sizes standard we are referring
to printed documents. This is because in soft form we
can view document at different Zoom.

• A4 page size is 8.3 x 11.7 inches

• Legal page size is 8.5 x 14 inches


Fonts (ctd)
Pitch:width of each character in font
– fixed-pitch – every character has the same width
e.g. Courier
– variable-pitched – some characters wider
e.g. Times Roman – compare the ‘i’ and the “m”
Serif or Sans-serif (Non-serif)
– sans-serif – square-ended strokes
e.g. Helvetica
– serif – with short cross-lines at the ends of the
strokes (such as).
e.g. Times Roman or Palatino
Readability of text
• lowercase
– easy to read shape of words
• UPPERCASE
-better for individual letters and non-sense words (code
etc)
e.g. flight numbers: BA793 vs. ba793.Particularly
important when naming keys to press (for example, ‘Press
Q to quit’) as keyboards have upper-case legends.
• serif fonts
– For printed text serif fonts helps our eyes to read along
lines of printed text
– but sans serif often better on screen
Page Description Languages
• Some printers can act in a mode whereby any characters
sent to them (encoded in ASCII) are printed, typewriter
style, in a single font.
• Many printed documents are far more complex
-different fonts, bitmaps, lines, digitised photos, etc.
• Can convert it all into a bitmap and send to the printer
… but often huge !
-A bitmap version of an A4 laser printer page at 300 dpi
(dots per inch) takes 8.2 Mbytes for grayscale; to send this
down a standard serial printer cable would take many
minutes!

How?
• To simplify it let's assume that A4 is 8 inches x 12
inches(Actually it is 8.27 x 11.69 inches).
File size is determined by the number of pixels so the aim
is to find out how many pixels the image contains. Since
the resolution is 300 dpi, it means that each inch is 300
pixels across. As the image is 8 inches wide that means
there are 2,400 pixels in width (8 x 300). Likewise, as the
image is 12 inches long, the image is 3,600 pixels in length
(12 x 300). To get the total we multiply the breadth by the
length and the answer is 8,640,000 pixels (2400 x 3600).
• Assuming this is a grayscale image and we know that for a
grayscale image each pixel is 8 bits or 1 byte in file
size. So in total the A4 image of 8,640,000 pixels has a file
size of 8,640,000 bytes or about 8.2 MB
• In RGB colour this would be a 24 MB image.
-Alternatively Use a page description language. This is a form
of programming language for printing.
-sends a description of the page to be printed rather
than its bitmap image,
-The idea is that the description of a page is far smaller
than the associated bitmap, reducing the time taken to
send the page to the printer.
-Contains instructions for curves, lines, text in different
styles, etc.

-PostScript is the most common (extension .ps)


-A computer in the printer has to interpret the PostScript
program to print the page; this is typically, but is still the
limiting factor for many print jobs.
• %!PS-Adobe-3.0
• %APL_DSC_Encoding: UTF8
• %APLProducer: (Version 10.7.4 (Build 11E53) Quartz PS Context)
• %%Title: (e3-chap-02.ppt)
• %%Creator: (PowerPoint: cgpdftops CUPS filter)
• %%CreationDate: (Tuesday, October 02 2012 01:13:32 PKT)
• %%For: (Awais Macbook)
• %%DocumentData: Clean7Bit
• %%LanguageLevel: 2
• %%PageOrder: Ascend
• %RBINumCopies: 1
• %%Pages: (atend)
• %%BoundingBox: (atend)
• %%EndComments
• userdict/dscInfo 5 dict dup begin
• /Title(e3-chap-02.ppt)def
• /Creator(PowerPoint: cgpdftops CUPS filter)def
• /CreationDate(Tuesday, October 02 2012 01:13:32 PKT)def
• /For(Awais Macbook)def
• /Pages 33 def
• end put
• %%BeginProlog
• %%BeginFile: lw8_errorhandler-2.0
Screen and page
• WYSIWYG
– A common requirement of word processors and
desktop publishing software is that what you see is
what you get, which is often called by its acronym
WYSIWYG. This means that the appearance of the
document on the screen should be the same as its
eventual appearance on the printed page
• but …
– typical screen resolution is about 72 dpi compared
with a laser printer at over 600 dpi
– the sizes and aspect ratios are very different. An A4
page is about 12 inches tall by 8 wide, whereas a
screen is often of similar dimensions, but wider than
it is tall
– can try to make them similar but never quite the
same
Scanners
• Take paper and convert it into a bitmap

• Two sorts of scanner


– flat-bed: paper placed on a glass plate, whole page
converted into bitmap
– hand-held: scanner passed over paper, digitising strip
typically 3-4” wide

• work by shining a beam of light at the page and then


recording the intensity and color of the reflection

• Typical resolutions
• from 600–2400 dpi
Scanners (ctd)
Used in
– document storage and retrieval systems, doing away
with paper storage. Electronic storage can be cheaper,
more reliable and more flexible
Optical character recognition
• Optical character recognition (OCR) is the process
whereby the computer can ‘read’ the characters on the
page.OCR converts bitmap back into text
• Current software can
recognize ‘unseen’ fonts
and can even produce
output in word-processing
formats, preserving super-
and subscripts, centering,
italics and so on.
-> Still not perfect.
virtual memory
• Problem:
– running lots of programs + each program large
– not enough RAM. Windowed systems will run several
applications simultaneously, soon using up many
megabytes. Operating systems handle this by paging
unused bits of programs out of RAM onto disk, or
even swapping the entire program onto disk.
• Solution - Virtual memory :
– store some programs temporarily on disk
– makes RAM appear bigger
• But … swapping
– If we select a window, and the relevant application
happens to be currently swapped out onto the disk, it
has to be swapped back in. The delay this causes can
be considerable, and is both noticeable and annoying
on many systems.
Compression
• compression techniques can be used to reduce the
amount of storage required for text, bitmaps and video.
• lossless
– recover exact text or image – e.g. GIF, ZIP
– Text can easily be reduced by a factor of five and
bitmaps often compress to 1% of their original size.
– look for commonalities.e.g

• Run-length encoding (RLE) is a very simple form of data


compression in which runs of data (that is, sequences in
which the same data value occurs in many consecutive
data elements) are stored as a single data value and
count, rather than as the original run.

• text: AAAAAAAAAABBBBBCCCCCCCC
10A5B8C
-For video, in addition to compressing each frame, we
can take advantage of the fact that successive frames
are often similar.
We can compute the difference between successive
frames and then store only this

lossy
-we cannot recover original – e.g. JPEG, MP3 exploit
perception
JPEG: lose rapid changes and some colour.
-exploits properties of human vision to eliminate
information that is difficult to distinguish
-degree of compression can be adjusted, allowing a
selectable tradeoff between storage size and image
quality.
Storage formats - text
• The basic standard for text storage is the ASCII
(American standard code for information interchange)
character codes.
• ASCII - Assign to each standard printable character
and several control characters an internationally
recognized 7 bit code (decimal values 0–127). Many
systems extend the codes to the values 128–255,
including line-drawing characters, mathematical symbols
and international letters.
• Unicode- It is a 16 bit extension, the UNICODE
standard, which has enough room for a much larger
range of characters
• RTF (rich text format)
- most common shared format is rich text format
- text plus formatting and layout information
- regards the document as formatted text, that is it
concentrates on the appearance
Storage formats - media

• Images:
– The stored image needs to record the size of the
image, the number of bits per pixel, possibly a color
map
– many storage formats :
( GIFF, JPEG, PNG, etc.)
– plus different compression techniques
(to reduce their storage requirements)
– Given the range of storage standards (or rather lack
of standards), there is no easy advice as to which is
best.
• Audio/Video
– again lots of formats :
(QuickTime, MPEG, WAV, etc.)
– compression even more important
– also ‘streaming’ formats for network delivery
Limitations on interactive
performance
There are several factors that can limit the speed of an
interactive system:
Computation bound
– Computation takes ages, causing frustration for the user
– The system should be designed so that the user gets some
idea of how the job is progressing.
– This can be achieved by having a counter or slowly filling
bar on the screen that indicates the amount done, or by
changing the cursor to indicate that processing is occurring.
Storage channel bound
– Bottleneck in transference of data from disk to memory
– Trade off memory against processing speed. For example,
compressed data take less space to store, and is faster to
read in and out, but must be compressed before storage
and decompressed when retrieved. Thus faster memory
access leads to increased processing time.
– For many interactive systems the ability to browse quickly
is very important, but users will accept delays when saving
updated information.
Graphics bound
– Common bottleneck: updating displays requires a lot of
effort - sometimes helped by adding a graphics co-
processor optimised to take on the burden
Network capacity
– Many computers networked - shared resources and files,
access to printers etc. - but interactive performance can be
reduced by slow network speed

You might also like