aboutsummaryrefslogtreecommitdiff
path: root/layout.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-02-18 09:07:32 -0500
committerJeffrey Armstrong <jeff@approximatrix.com>2021-02-18 09:10:27 -0500
commit2499f1720602a9010f4618f0b686f077febbdf55 (patch)
treea7bfbf464fcd62fbd5fd4cc9a9b94d0390980afb /layout.f90
parent81bc5140a2961e97ecacd2296da9f3111f7c91de (diff)
downloadLR-87-2499f1720602a9010f4618f0b686f077febbdf55.zip
LR-87-2499f1720602a9010f4618f0b686f077febbdf55.tar.gz
Preformatted text should no longer wrap, and the stopping point for printing preformatted text is now calculated. Removed double-accounting of borders in text width calculations.
Diffstat (limited to 'layout.f90')
-rw-r--r--layout.f9014
1 files changed, 11 insertions, 3 deletions
diff --git a/layout.f90 b/layout.f90
index e28981d..41b6d56 100644
--- a/layout.f90
+++ b/layout.f90
@@ -55,8 +55,16 @@ contains
call rendering_engine%prepare_for_layout()
do while(laying_out)
- if(walker%line_type == line_type_text .and. .not. associated(walker%breaks)) then
- walker%breaks => calculate_wrapping(rendering_engine, walker%text)
+ if(.not. associated(walker%breaks)) then
+ select case (walker%line_type)
+
+ case (line_type_text)
+ walker%breaks => calculate_wrapping(rendering_engine, walker%text)
+
+ case (line_type_preformatted)
+ walker%breaks => calculate_stop(rendering_engine, walker%text)
+
+ end select
end if
select case (walker%line_type)
@@ -65,7 +73,7 @@ contains
call render_proportional(rendering_engine, walker%text, walker%breaks)
case (line_type_preformatted)
- call render_preformatted(rendering_engine, walker%text)
+ call render_preformatted(rendering_engine, walker%text, walker%breaks(1))
case (line_type_link)
call render_link(rendering_engine, walker%text)